syslinux: ensure "default" line is there

alterator-netinst currently relies on "default"
being specified explicitly; it's wrong and it should
cope with the first "label" clause as well but we're
better off being strict to this script, not that one.

This commit should be no-op regarding syslinux itself.
This commit is contained in:
Michael Shigorin 2013-09-23 18:10:38 +04:00
parent 8f7c712390
commit c7dadfd899

View File

@ -33,8 +33,8 @@ fi
# number ordering sponsored by shell's pathname expansion
grep -hv '^#' .in/[0-9][0-9]*.cfg > "$CFG"
# there should be either DEFAULT or UI directive there
if ! egrep -i '^(default|ui)' "$CFG"; then
# there should be DEFAULT directive there (at least for alterator-netinst)
if ! grep -i '^default' "$CFG"; then
DEFAULT="$(grep -i '^label ' "$CFG" | head -1 | cut -f2 -d' ')"
if [ -n "$DEFAULT" ]; then
echo "default $DEFAULT" >> "$CFG"