diff options
author | Jesse Hathaway <jesse@mbuki-mvuki.org> | 2007-10-31 16:20:57 -0400 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:22:28 +0100 |
commit | 86a090e029bbe7cdf2783153c69dd2502c1f0413 (patch) | |
tree | 9c68cc4811ffe2ea6c20bba43c5024cb75149558 | |
parent | 1652f585751bd32f850933980e98a409bec8da0c (diff) | |
download | live-build-86a090e029bbe7cdf2783153c69dd2502c1f0413.zip live-build-86a090e029bbe7cdf2783153c69dd2502c1f0413.tar.gz |
fix isolinux when booting multiple kernel flavours
-rwxr-xr-x | helpers/lh_binary_syslinux | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux index 5e87d75..109f96d 100755 --- a/helpers/lh_binary_syslinux +++ b/helpers/lh_binary_syslinux @@ -100,7 +100,7 @@ Syslinux_live_entry () if [ ${LH_BINARY_IMAGES} = "iso" ] || [ ${LH_BINARY_IMAGES} = "usb-hdd" ] then - num=$(ls -1 ${KERNEL_PATH}|grep 'vmlinuz.\.img$'|wc -l) + num=$(ls -1 ${KERNEL_PATH}|grep 'vmlinuz[0-9]\+$'|wc -l) num=$(($num +1)) # Note: ISOLINUX will not find the kernel if the name ends in ".img". mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${num} @@ -473,13 +473,14 @@ Syslinux_live_entry "live" "${LH_SYSLINUX_MENU_LIVE_ENTRY}" "${DEFAULT_KERNEL}" if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ] then - for KERNEL in chroot/boot/vmlinuz-* + for FLAVOUR in ${LH_LINUX_FLAVOURS} do - KERNEL_IMAGE="$(basename ${KERNEL})" - KERNEL_VERSION="$(echo ${KERNEL_IMAGE} | sed -e 's/vmlinuz-//')" - INITRD="initrd.img-${KERNEL_VERSION}" - - Syslinux_live_entry "live-${KERNEL_VERSION}" "${LH_SYSLINUX_MENU_LIVE_ENTRY}" "${KERNEL_IMAGE}" "${INITRD}" + if [ "${FLAVOUR}" != "${DEFAULT_FLAVOUR}" ] + then + FLAVOUR_KERNEL="$(basename chroot/boot/vmlinuz-*${FLAVOUR})" + FLAVOUR_INITRD="initrd.img-$(echo ${FLAVOUR_KERNEL} | sed -e 's/vmlinuz-//')" + Syslinux_live_entry "live-${FLAVOUR}" "${LH_SYSLINUX_MENU_LIVE_ENTRY} ${FLAVOUR}" "${FLAVOUR_KERNEL}" "${FLAVOUR_INITRD}" + fi done fi |