summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/build/binary_syslinux19
1 files changed, 13 insertions, 6 deletions
diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux
index bf2fb0316..081b55cf9 100755
--- a/scripts/build/binary_syslinux
+++ b/scripts/build/binary_syslinux
@@ -238,12 +238,19 @@ then
mv binary/live/vmlinuz-*-${_FLAVOUR} binary/live/vmlinuz${_NUMBER}
mv binary/live/initrd.img-*-${_FLAVOUR} binary/live/initrd${_NUMBER}.img
- sed -e "s|@FLAVOUR@|${_FLAVOUR}|g" \
- -e "s|@LINUX@|/live/vmlinuz${_NUMBER}|g" \
- -e "s|@INITRD@|/live/initrd${_NUMBER}.img|g" \
- -e "s|@APPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \
- -e "s|@APPEND_FAILSAFE@|${LB_BOOTAPPEND_FAILSAFE}|g" \
- "${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
+ if [ "${_NUMBER}" -gt 1 ]
+ then
+ grep -v 'menu default' "${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
+ else
+ cat "${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
+ fi
+
+ sed -i -e "s|@FLAVOUR@|${_FLAVOUR}|g" \
+ -e "s|@LINUX@|/live/vmlinuz${_NUMBER}|g" \
+ -e "s|@INITRD@|/live/initrd${_NUMBER}.img|g" \
+ -e "s|@APPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \
+ -e "s|@APPEND_FAILSAFE@|${LB_BOOTAPPEND_FAILSAFE}|g" \
+ "${_TARGET}/live.cfg"
done
rm -f "${_TARGET}/live.cfg.in"