summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-10-01 05:01:18 +0200
committerDaniel Baumann <daniel@debian.org>2012-10-01 05:01:18 +0200
commit711d6504f176ac81c74f988c564e85667643acd9 (patch)
tree9d6912f8c7364d438f972c1c83ce8c7ddf792f3a
parent5b8cfdc193ca2accabfa1c83bafafc8d710a7870 (diff)
downloadvyos-live-build-711d6504f176ac81c74f988c564e85667643acd9.tar.gz
vyos-live-build-711d6504f176ac81c74f988c564e85667643acd9.zip
Using menu default only once when populating syslinux configurations for more than one kernel flavour (Closes: #682957).
-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"