summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_grub
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/lh_binary_grub')
-rwxr-xr-xhelpers/lh_binary_grub45
1 files changed, 13 insertions, 32 deletions
diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub
index 3b652af..894815e 100755
--- a/helpers/lh_binary_grub
+++ b/helpers/lh_binary_grub
@@ -68,24 +68,11 @@ then
fi
fi
-if [ ! -f chroot/usr/sbin/grub ]
-then
- PACKAGES="${PACKAGES} grub"
-fi
-
-if [ -n "${PACKAGES}" ]
-then
- # Installing symlinks
- case "${LH_APT}" in
- apt|apt-get)
- Chroot "apt-get install --yes ${PACKAGES}"
- ;;
+# Checking depends
+Check_package chroot/usr/sbin/grub grub
- aptitude)
- Chroot "aptitude install --assume-yes ${PACKAGES}"
- ;;
- esac
-fi
+# Installing depends
+Install_package
# Setting destination directory
case "${LIVE_BINARY_IMAGE}" in
@@ -176,15 +163,20 @@ cp -r "${LIVE_TEMPLATES}"/grub/* binary/boot/grub
# Copyring grub
case ${LIVE_BINARY_IMAGE} in
iso)
- cp chroot/usr/lib/grub/i386-pc/stage2_eltorito binary/boot/grub
+ cp chroot/usr/lib/grub/*/stage2_eltorito binary/boot/grub
;;
usb|hdd)
- cp chroot/usr/lib/grub/i386-pc/stage1 chroot/usr/lib/grub/i386-pc/stage2 binary/boot/grub
+ cp chroot/usr/lib/grub/*/stage1 chroot/usr/lib/grub/*/stage2 binary/boot/grub
;;
esac
# Copying splash screen
+if [ -f config/binary_grub/splash.xpm.gz ]
+then
+ LIVE_GRUB_SPLASH="config/binary_grub/splash.xpm.gz"
+fi
+
if [ -n "${LIVE_GRUB_SPLASH}" ]
then
if [ "${LIVE_GRUB_SPLASH}" = "none" ]
@@ -213,19 +205,8 @@ EOF
sed -i -e "s#LIVE_KERNEL_LIVE#${LINUX}#" -e "s#LIVE_KERNEL_INSTALL#${LIVE_KERNEL_INSTALL}#" -e "s#LIVE_MEMTEST#${MEMTEST}#" binary/boot/grub/menu.lst
sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" binary/boot/grub/menu.lst
-if [ -n "${PACKAGES}" ]
-then
- # Removing packages
- case "${LH_APT}" in
- apt|apt-get)
- Chroot "apt-get remove --purge --yes ${PACKAGES}"
- ;;
-
- aptitude)
- Chroot "aptitude purge --assume-yes ${PACKAGES}"
- ;;
-esac
-fi
+# Removing depends
+Remove_package
# Creating stage file
Create_stagefile .stage/binary_grub