Omit numbering for first kernel and initrd installed into binary.

This commit is contained in:
Cody A.W. Somerville 2009-11-12 06:42:04 +01:00 committed by Daniel Baumann
parent dbcae19129
commit f8b187c7a9
1 changed files with 6 additions and 0 deletions

View File

@ -94,6 +94,12 @@ Syslinux_live_entry ()
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