Makefile | 2 +-
tools/livecd-iso-to-disk.sh | 35 ++++++++++++++++++++++++-----------
2 files changed, 25 insertions(+), 12 deletions(-)
New commits:
commit 4c690327ea2a03633f86e443f32b0743e08d054a
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Sep 27 14:06:06 2011 -0700
Version 15.9
diff --git a/Makefile b/Makefile
index 83d9127..02382e4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 15.8
+VERSION = 15.9
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
commit d0960325daa0c76370f9f8ac141540b7adeab74c
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Wed Mar 16 10:42:42 2011 -0700
Support /EFI/BOOT or /EFI/boot (#688258)
Some iso's use lower case. Upper case is correct, but both work.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 6b71a09..580473d 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -640,6 +640,8 @@ copyFile() {
cp "$1" "$2"
}
+shopt -s extglob
+
cryptedhome=1
keephome=1
homesizemb=0
@@ -853,9 +855,15 @@ if [ -f "$TGTMNT/$LIVEOS/$HOMEFILE" -a -n
"$keephome" -a "$homesizemb" -gt 0 ];
exitclean
fi
-if [ -n "$efi" -a ! -d $SRCMNT/EFI/boot ]; then
- echo "ERROR: This live image does not support EFI booting"
- exitclean
+if [ -n "$efi" ]; then
+ if [ -d $SRCMNT/EFI/BOOT ]; then
+ EFI_BOOT="/EFI/BOOT"
+ elif [ -d $SRCMNT/EFI/boot ]; then
+ EFI_BOOT="/EFI/boot"
+ else
+ echo "ERROR: This live image does not support EFI booting"
+ exitclean
+ fi
fi
# let's try to make sure there's enough room on the target device
@@ -871,7 +879,7 @@ fi
if [[ live == $srctype ]]; then
targets="$TGTMNT/$SYSLINUXPATH"
- [[ -n $efi ]] && targets+=" $TGTMNT/EFI/boot"
+ [[ -n $efi ]] && targets+=" $TGTMNT$EFI_BOOT"
[[ -n $xo ]] && targets+=" $TGTMNT/boot/olpc.fth"
duTable=($(du -c -B 1M $targets 2> /dev/null))
((tbd += ${duTable[*]: -2:1}))
@@ -894,7 +902,8 @@ if [[ live == $srctype ]]; then
sources="$SRCMNT/LiveOS/ext3fs.img $SRCMNT/LiveOS/osmin.img"
[[ -z $skipcompress ]] && sources+=" $SRCMNT/LiveOS/squashfs.img"
sources+=" $SRCMNT/isolinux $SRCMNT/syslinux"
- [[ -n $efi ]] && sources+=" $SRCMNT/EFI/boot"
+ [[ -n $efi ]] && sources+=" $SRCMNT$EFI_BOOT"
+ [[ -n $xo ]] && sources+=" $SRCMNT/boot/olpc.fth"
duTable=($(du -c -B 1M "$thisScriptpath" $sources 2> /dev/null))
((livesize += ${duTable[*]: -2:1}))
fi
@@ -976,7 +985,7 @@ fi
# Bootloader is always reconfigured, so keep these out of the if skipcopy stuff.
[ ! -d $TGTMNT/$SYSLINUXPATH ] && mkdir -p $TGTMNT/$SYSLINUXPATH
-[ -n "$efi" -a ! -d $TGTMNT/EFI/boot ] && mkdir -p $TGTMNT/EFI/boot
+[ -n "$efi" -a ! -d $TGTMNT$EFI_BOOT ] && mkdir -p $TGTMNT$EFI_BOOT
# Live image copy
set -o pipefail
@@ -1030,11 +1039,15 @@ BOOTCONFIG=$TGTMNT/$SYSLINUXPATH/isolinux.cfg
# Set this to nothing so sed doesn't care
BOOTCONFIG_EFI=
if [ -n "$efi" ]; then
- cp $SRCMNT/EFI/boot/* $TGTMNT/EFI/boot
+ cp $SRCMNT$EFI_BOOT/* $TGTMNT$EFI_BOOT
+
+ # FIXME
+ # There is a problem here. On older LiveCD's the files are boot?*.conf
+ # They really should be renamed to BOOT?*.conf
# this is a little ugly, but it gets the "interesting" named config file
- BOOTCONFIG_EFI=$TGTMNT/EFI/boot/boot?*.conf
- rm -f $TGTMNT/EFI/boot/grub.conf
+ BOOTCONFIG_EFI=$TGTMNT$EFI_BOOT/+(BOOT|boot)?*.conf
+ rm -f $TGTMNT$EFI_BOOT/grub.conf
fi
if [[ live == $srctype ]]; then
@@ -1213,8 +1226,8 @@ if [ -z "$multi" ]; then
echo "Installing boot loader"
if [ -n "$efi" ]; then
# replace the ia32 hack
- if [ -f "$TGTMNT/EFI/boot/boot.conf" ]; then
- cp -f $TGTMNT/EFI/boot/bootia32.conf $TGTMNT/EFI/boot/boot.conf
+ if [ -f "$TGTMNT$EFI_BOOT/boot.conf" ]; then
+ cp -f $TGTMNT$EFI_BOOT/BOOTia32.conf $TGTMNT$EFI_BOOT/BOOT.conf
fi
fi
Show replies by date