diff options
Diffstat (limited to 'scripts/build')
-rwxr-xr-x | scripts/build/lb_binary_burg | 26 | ||||
-rwxr-xr-x | scripts/build/lb_binary_grub2 | 26 |
2 files changed, 52 insertions, 0 deletions
diff --git a/scripts/build/lb_binary_burg b/scripts/build/lb_binary_burg index 9afca88..e2eea70 100755 --- a/scripts/build/lb_binary_burg +++ b/scripts/build/lb_binary_burg @@ -67,6 +67,32 @@ Burg_live_entry () INITRD="${3}" APPEND="${4}" + case "${LB_BINARY_IMAGES}" in + iso*|usb*) + if [ "${LABEL}" = "live" ] + 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}')" + fi + + if [ -e ${KERNEL_PATH}/${KERNEL} ] + then + mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${_NUMBER} + fi + + if [ -e ${KERNEL_PATH}/${INITRD} ] + then + mv ${KERNEL_PATH}/${INITRD} ${KERNEL_PATH}/initrd${_NUMBER}.img + fi + + KERNEL=vmlinuz${_NUMBER} + INITRD=initrd${_NUMBER}.img + ;; + esac + LINUX_LIVE="${LINUX_LIVE}\nmenuentry \"Debian GNU/Linux - ${LABEL}\" {" LINUX_LIVE="${LINUX_LIVE}\nlinux\t\t/${KERNEL} boot=${INITFS} config LB_BOOTAPPEND_LIVE ${APPEND}" LINUX_LIVE="${LINUX_LIVE}\ninitrd\t\t/${INITRD}" diff --git a/scripts/build/lb_binary_grub2 b/scripts/build/lb_binary_grub2 index 6ad8c3c..fdfca0d 100755 --- a/scripts/build/lb_binary_grub2 +++ b/scripts/build/lb_binary_grub2 @@ -67,6 +67,32 @@ Grub_live_entry () INITRD="${3}" APPEND="${4}" + case "${LB_BINARY_IMAGES}" in + iso*|usb*) + if [ "${LABEL}" = "live" ] + 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}')" + fi + + if [ -e ${KERNEL_PATH}/${KERNEL} ] + then + mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${_NUMBER} + fi + + if [ -e ${KERNEL_PATH}/${INITRD} ] + then + mv ${KERNEL_PATH}/${INITRD} ${KERNEL_PATH}/initrd${_NUMBER}.img + fi + + KERNEL=vmlinuz${_NUMBER} + INITRD=initrd${_NUMBER}.img + ;; + esac + LINUX_LIVE="${LINUX_LIVE}\nmenuentry \"Debian GNU/Linux - ${LABEL}\" {" LINUX_LIVE="${LINUX_LIVE}\nlinux\t\t/${KERNEL} boot=${INITFS} config LB_BOOTAPPEND_LIVE ${APPEND}" LINUX_LIVE="${LINUX_LIVE}\ninitrd\t\t/${INITRD}" |