diff options
author | Daniel Baumann <daniel@debian.org> | 2010-09-26 12:38:38 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:19:23 +0100 |
commit | c5c3f6133a0fb62ba9c2c3b839e6ea5774f9c76a (patch) | |
tree | 44a6d3a12cd11067aea2a4d43eb9133cc25bad2f /scripts/build/lb_binary_syslinux | |
parent | 941a47be0ca3061f54a237583092357d1ff80f7c (diff) | |
download | vyos-live-build-c5c3f6133a0fb62ba9c2c3b839e6ea5774f9c76a.tar.gz vyos-live-build-c5c3f6133a0fb62ba9c2c3b839e6ea5774f9c76a.zip |
Adding debian version 3.0~a1-1.
Diffstat (limited to 'scripts/build/lb_binary_syslinux')
-rwxr-xr-x | scripts/build/lb_binary_syslinux | 23 |
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 |