summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-01-17 10:01:25 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:33 +0100
commit251b0ae47f1e9cd7e040bf5340ab6377a9023653 (patch)
treedb134ff10002eb1a638645fb741acaef6221fae4 /scripts
parent218610081a48f3cbaf2e42441cfe7182f1242fe5 (diff)
downloadlive-build-251b0ae47f1e9cd7e040bf5340ab6377a9023653.zip
live-build-251b0ae47f1e9cd7e040bf5340ab6377a9023653.tar.gz
Simplyfing grub-mkimage legacy handling for lenny in lb_binary_iso.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_binary_iso21
1 files changed, 13 insertions, 8 deletions
diff --git a/scripts/build/lb_binary_iso b/scripts/build/lb_binary_iso
index ad7357e..007c5b5 100755
--- a/scripts/build/lb_binary_iso
+++ b/scripts/build/lb_binary_iso
@@ -156,6 +156,18 @@ fi
if [ "${LB_BOOTLOADER}" = "grub2" ]
then
+ case "${LB_DISTRIBUTION}" in
+ lenny)
+ GRUB_MKIMAGE_OPTIONS=""
+ ;;
+
+ *)
+ # grub >= 1.98+20100527 requires -O, see #584415
+ GRUB_MKIMAGE_OPTIONS="-O i386-pc"
+ ;;
+
+ esac
+
cat > binary.sh << EOF
#!/bin/sh
@@ -163,14 +175,7 @@ input_dir=/usr/lib/grub/i386-pc
# build core.img
core_img=\$(mktemp)
-
-# first version requiring -O is 1.98+20100527, see #584415
-if [ "$(grub-mkimage --help | grep '\-O')" ]
-then
- grub-mkimage -d \${input_dir} -o \${core_img} -O i386-pc biosdisk iso9660
-else
- grub-mkimage -d \${input_dir} -o \${core_img} biosdisk iso9660
-fi
+grub-mkimage -d \${input_dir} -o \${core_img} ${GRUB_MKIMAGE_OPTIONS} biosdisk iso9660
# build grub_eltorito image
cat \${input_dir}/cdboot.img \${core_img} > binary/boot/grub/grub_eltorito