diff options
author | Daniel Baumann <daniel@debian.org> | 2012-10-01 05:01:18 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-10-01 05:01:18 +0200 |
commit | 711d6504f176ac81c74f988c564e85667643acd9 (patch) | |
tree | 9d6912f8c7364d438f972c1c83ce8c7ddf792f3a /scripts/build | |
parent | 5b8cfdc193ca2accabfa1c83bafafc8d710a7870 (diff) | |
download | vyos-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).
Diffstat (limited to 'scripts/build')
-rwxr-xr-x | scripts/build/binary_syslinux | 19 |
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" |