summaryrefslogtreecommitdiff
path: root/scripts/build/lb_binary_syslinux
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/lb_binary_syslinux')
-rwxr-xr-xscripts/build/lb_binary_syslinux23
1 files changed, 11 insertions, 12 deletions
diff --git a/scripts/build/lb_binary_syslinux b/scripts/build/lb_binary_syslinux
index fa4d96320..9a96c5df1 100755
--- a/scripts/build/lb_binary_syslinux
+++ b/scripts/build/lb_binary_syslinux
@@ -1,7 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
-## Copyright (C) 2006-2011 Daniel Baumann <daniel@debian.org>
+## Copyright (C) 2006-2010 Daniel Baumann <daniel@debian.org>
##
## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
@@ -95,28 +95,27 @@ Syslinux_live_entry ()
case "${LB_BINARY_IMAGES}" in
iso*|usb*)
- if [ "${LABEL}" = "live" ]
+ NUMBER="$(ls -1 ${KERNEL_PATH} | grep 'vmlinuz-' | wc -l)"
+
+ # Do not add numbering to filenames if first kernel/initrd
+ if [ "${NUMBER}" = "2" ]
then
- # Do not number the default kernel / initrd files.
- _NUMBER=""
- else
- # Use order of flavours in LB_LINUX_FLAVOURS for numbering.
- _NUMBER="$(echo ${LB_LINUX_FLAVOURS} | awk -v FLAVOUR="${FLAVOUR}" 'BEGIN{RS=" "} {if($1 == FLAVOUR) print NR}')"
+ NUMBER=""
fi
+ # Note: ISOLINUX will not find the kernel if the name ends in ".img".
if [ -e ${KERNEL_PATH}/${KERNEL} ]
then
- # Note: ISOLINUX will not find the kernel if the name ends in ".img".
- mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${_NUMBER}
+ mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${NUMBER}
fi
if [ -e ${KERNEL_PATH}/${INITRD} ]
then
- mv ${KERNEL_PATH}/${INITRD} ${KERNEL_PATH}/initrd${_NUMBER}.img
+ mv ${KERNEL_PATH}/${INITRD} ${KERNEL_PATH}/initrd${NUMBER}.img
fi
- KERNEL=vmlinuz${_NUMBER}
- INITRD=initrd${_NUMBER}.img
+ KERNEL=vmlinuz${NUMBER}
+ INITRD=initrd${NUMBER}.img
;;
esac