summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_grub
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:15 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:26 +0100
commitc79ab34a7c597c9e3ab202c644121c6944789424 (patch)
tree324691f4f851c719b864229b399584f035b2873f /helpers/lh_binary_grub
parent0d5ff4ca7596790f853cf637e0fe225cad810a76 (diff)
downloadlive-build-c79ab34a7c597c9e3ab202c644121c6944789424.zip
live-build-c79ab34a7c597c9e3ab202c644121c6944789424.tar.gz
Adding live-helper 1.0~a19-1.
Diffstat (limited to 'helpers/lh_binary_grub')
-rwxr-xr-xhelpers/lh_binary_grub25
1 files changed, 19 insertions, 6 deletions
diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub
index b196ad1..1bcf4ab 100755
--- a/helpers/lh_binary_grub
+++ b/helpers/lh_binary_grub
@@ -60,6 +60,9 @@ Check_architecture amd64 i386
# Checking depends
Check_package chroot/usr/sbin/grub grub
+# Restoring cache
+Restore_cache cache/packages_binary
+
# Installing depends
Install_package
@@ -185,8 +188,8 @@ DEFAULT_FLAVOUR="`echo ${LIVE_LINUX_FLAVOURS} | awk '{ print $1 }'`"
DEFAULT_KERNEL="`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`"
DEFAULT_INITRD="initrd.img-`echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//'`"
-Grub_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}"
-Grub_live_entry "live (fail-safe mode)" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}"
+Grub_live_entry "live" "`basename ${DESTDIR_LIVE}`/${DEFAULT_KERNEL}" "`basename ${DESTDIR_LIVE}`/${DEFAULT_INITRD}"
+Grub_live_entry "live (fail-safe mode)" "`basename ${DESTDIR_LIVE}`/${DEFAULT_KERNEL}" "`basename ${DESTDIR_LIVE}`/${DEFAULT_INITRD}" "${FAILSAFE}"
for KERNEL in chroot/boot/vmlinuz-*
do
@@ -234,19 +237,26 @@ fi
# Copying templates
mkdir -p binary/boot/grub
-cp -r "${LIVE_TEMPLATES}"/grub/* binary/boot/grub
+cp -r "${TEMPLATES}"/* binary/boot/grub
-# Copying grub
case ${LIVE_BINARY_IMAGES} in
iso)
- cp chroot/usr/lib/grub/*/stage2_eltorito binary/boot/grub
+ FILES="chroot/usr/lib/grub/*/stage2_eltorito"
;;
tar|usb-hdd)
- cp chroot/usr/lib/grub/*/stage1 chroot/usr/lib/grub/*/e2fs_stage1_5 chroot/usr/lib/grub/*/stage2 binary/boot/grub
+ FILES="chroot/usr/lib/grub/*/stage1 chroot/usr/lib/grub/*/e2fs_stage1_5 chroot/usr/lib/grub/*/stage2"
;;
esac
+if [ "${LIVE_CHROOT_BUILD}" = "disabled" ]
+then
+ FILES="`echo ${FILES} | sed -e 's/chroot//g'`"
+fi
+
+# Copying grub
+cp ${FILES} binary/boot/grub
+
# Copying local configuration file
if [ -f config/binary_grub/menu.lst ]
then
@@ -283,6 +293,9 @@ sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/boot/grub/menu.lst
sed -i -e 's/\ $//g' binary/boot/grub/menu.lst
+# Saving cache
+Save_cache cache/packages_binary
+
# Removing depends
Remove_package