Commit 346e3c21 authored by Anton Midyukov's avatar Anton Midyukov

syslinux: Added the ability to define the default menu item

Example: @$(call set,SYSLINUX_DEFAULT,harddisk) @$(call xport,SYSLINUX_DEFAULT) See features.in/syslinux/cfg.in/*.cfg
parent a6c36206
......@@ -34,6 +34,16 @@ fi
grep -hv '^#' .in/[0-9][0-9]*.cfg > "$CFG"
# there should be DEFAULT directive there (at least for alterator-netinst)
if [ -n "$GLOBAL_SYSLINUX_DEFAULT" ]; then
if [ -n "$(grep -i "^label $GLOBAL_SYSLINUX_DEFAULT" "$CFG")" ]; then
DEFAULT="$GLOBAL_SYSLINUX_DEFAULT"
sed -i '/^default/d'
echo "default $DEFAULT" >> "$CFG"
else
echo "error: $GLOBAL_SYSLINUX_DEFAULT missing in $CFG" >&2
exit 1
fi
fi
if ! grep -i '^default' "$CFG"; then
DEFAULT="$(grep -i '^label ' "$CFG" | head -1 | cut -f2 -d' ')"
if [ -n "$DEFAULT" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment