[PATCH] Omit numbering for first kernel and initrd installed into binary
Hello,
Please accept this patch to modify lh_binary_syslinux to forgo numbering the kernel image and initrd if its the first kernel/initrd being installed. This results in the names of these files matching to what you'd find on a normal Ubuntu (and I think Debian) cd while maintaining the ability to install multiple kernel images/initrds into the image.
Cheers,
--
Cody A.W. Somerville
Software Systems Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1-781-850-2087
Cell: +1-506-471-8402
Email: cody.somerville@canonical.com
=== modified file 'helpers/lh_binary_syslinux'
--- helpers/lh_binary_syslinux 2009-06-08 05:36:05 +0000
+++ helpers/lh_binary_syslinux 2009-11-08 14:22:28 +0000
@@ -94,6 +94,12 @@
NUMBER="$(ls -1 ${KERNEL_PATH} | grep 'vmlinuz[0-9]\+$' | wc -l)"
NUMBER="$((${NUMBER} +1))"
+ # Do not add numbering to filenames if first kernel/initrd
+ if [ "${NUMBER}" = "1" ]
+ then
+ NUMBER=""
+ fi
+
# Note: ISOLINUX will not find the kernel if the name ends in ".img".
mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${NUMBER}
mv ${KERNEL_PATH}/${INITRD} ${KERNEL_PATH}/initrd${NUMBER}.img
Reply to: