diff options
author | Andreas Loibl <andreas@andreas-loibl.de> | 2012-03-01 20:56:55 +0100 |
---|---|---|
committer | Andreas Loibl <andreas@andreas-loibl.de> | 2012-03-01 20:56:55 +0100 |
commit | e4828b529d4d6e4911e16aa9e2851da6f4e2f299 (patch) | |
tree | 15243e2cc57ef4dc7531d6076291a283cf3673fa /auto/functions/livebuild-hacks | |
parent | b49aa37ab08d1a1dff79bfed30cfaf3fc1812708 (diff) | |
download | kanotix-e4828b529d4d6e4911e16aa9e2851da6f4e2f299.zip kanotix-e4828b529d4d6e4911e16aa9e2851da6f4e2f299.tar.gz |
fixed overloading of Grub_live_entry for live-build 2 and 3
Diffstat (limited to 'auto/functions/livebuild-hacks')
-rw-r--r-- | auto/functions/livebuild-hacks | 82 |
1 files changed, 51 insertions, 31 deletions
diff --git a/auto/functions/livebuild-hacks b/auto/functions/livebuild-hacks index 7df44df..f9da5ce 100644 --- a/auto/functions/livebuild-hacks +++ b/auto/functions/livebuild-hacks @@ -35,42 +35,62 @@ fi # Grub2: Do not number the default kernel / initrd files. if [ "$(basename "$0")" = "lb_binary_grub2" ]; then echo "HOOK: livebuild-hacks@binary_grub2" - Grub_live_entry () + Overload_Grub_live_entry () { - LABEL="${1}" - KERNEL="${2}" - INITRD="${3}" - APPEND="${4}" + Grub_live_entry () + { + echo "HACK: overloaded Grub_live_entry called." + LABEL="${1}" + KERNEL="${2}" + 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 + 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 binary/${KERNEL} ] - then - mv binary/${KERNEL} "binary/$(dirname ${KERNEL})/vmlinuz${_NUMBER}" | : - KERNEL="$(dirname ${KERNEL})/vmlinuz${_NUMBER}" - fi + if [ -e binary/${KERNEL} ] + then + mv binary/${KERNEL} "binary/$(dirname ${KERNEL})/vmlinuz${_NUMBER}" | : + KERNEL="$(dirname ${KERNEL})/vmlinuz${_NUMBER}" + fi - if [ -e binary/${INITRD} ] - then - mv binary/${INITRD} "binary/$(dirname ${INITRD})/initrd${_NUMBER}.img" | : - INITRD="$(dirname ${INITRD})/initrd${_NUMBER}.img" - fi - ;; - esac + if [ -e binary/${INITRD} ] + then + mv binary/${INITRD} "binary/$(dirname ${INITRD})/initrd${_NUMBER}.img" | : + INITRD="$(dirname ${INITRD})/initrd${_NUMBER}.img" + fi + ;; + 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}" - LINUX_LIVE="${LINUX_LIVE}\n}" + 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}" + LINUX_LIVE="${LINUX_LIVE}\n}" + } + } + Check_multiarchitectures () + { + . "${LB_BASE}"/functions/architectures.sh + Check_multiarchitectures "$@" + Overload_Grub_live_entry + RC=$? + return $RC + } + Check_multiarchitecture () + { + . "${LB_BASE}"/functions/architectures.sh + Check_multiarchitecture "$@" + Overload_Grub_live_entry + RC=$? + return $RC } fi |