[SCM] live-build branch, debian-old-2.0, updated. debian/2.0.10-1-3-g3d934d9
Daniel Baumann
daniel at debian.org
Sun Dec 19 20:50:19 UTC 2010
The following commit has been merged in the debian-old-2.0 branch:
commit 3d934d941fc52a3c3c95b30ae4942f2c8f9d17b5
Author: Cody A.W. Somerville <cody.somerville at canonical.com>
Date: Fri Dec 17 11:30:36 2010 +0100
Fixing numbering of live kernels and initrd files when using syslinux.
diff --git a/scripts/build/lb_binary_syslinux b/scripts/build/lb_binary_syslinux
index 9a96c5d..46b607a 100755
--- a/scripts/build/lb_binary_syslinux
+++ b/scripts/build/lb_binary_syslinux
@@ -95,27 +95,28 @@ Syslinux_live_entry ()
case "${LB_BINARY_IMAGES}" in
iso*|usb*)
- NUMBER="$(ls -1 ${KERNEL_PATH} | grep 'vmlinuz-' | wc -l)"
-
- # Do not add numbering to filenames if first kernel/initrd
- if [ "${NUMBER}" = "2" ]
+ if [ "${LABEL}" = "live" ]
then
- NUMBER=""
+ # 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}')"
fi
- # Note: ISOLINUX will not find the kernel if the name ends in ".img".
if [ -e ${KERNEL_PATH}/${KERNEL} ]
then
- mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${NUMBER}
+ # Note: ISOLINUX will not find the kernel if the name ends in ".img".
+ 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
--
live-build
More information about the debian-live-changes
mailing list