Makefile | 2 +-
tools/livecd-iso-to-disk.sh | 24 +++++++++++++++++-------
2 files changed, 18 insertions(+), 8 deletions(-)
New commits:
commit 39a35a5f85fe70b693c7aab3e6fc9bc3e8b818c3
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Oct 27 11:40:04 2014 -0700
Version 20.6
diff --git a/Makefile b/Makefile
index b158579..50a0f63 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 20.5
+VERSION = 20.6
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
commit a1c98271f03839364a8893559abf35748ca9d73f
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Oct 27 11:29:27 2014 -0700
Ignore case when looking for UEFI boot*efi file (#1156380)
The UEFI boot executable on removable devices can be mixed case or all
one case. In F21 it will be all upper case so this makes the check
case-insensitive so that it will work with new and old media.
(cherry picked from commit f1e6445f4e5c2b21d5abebbbd73e8ae0a99fd80f)
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 696407c..62b34b1 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -305,6 +305,16 @@ isdevloop() {
[ x"${1#/dev/loop}" != x"$1" ]
}
+# Return the matching file ignoring case or 1 if no match
+nocase_path() {
+ local ret=0
+ shopt -s nocaseglob
+ [ -e "$1" ] || ret=1
+ echo $1
+ shopt -u nocaseglob
+ return $ret
+}
+
getdisk() {
DEV=$1
@@ -1136,8 +1146,8 @@ if [ -n "$efi" ]; then
# grub.cfg
if [ -e $TGTMNT$EFI_BOOT/grub.cfg ]; then
BOOTCONFIG_EFI=$TGTMNT$EFI_BOOT/grub.cfg
- elif [ -e $TGTMNT$EFI_BOOT/+(BOOT|boot)?*.conf ]; then
- BOOTCONFIG_EFI=$TGTMNT$EFI_BOOT/+(BOOT|boot)?*.conf
+ elif [ -e $(nocase_path "$TGTMNT$EFI_BOOT/boot*.conf") ]; then
+ BOOTCONFIG_EFI=$(nocase_path "$TGTMNT$EFI_BOOT/boot*.conf")
else
echo "Unable to find EFI config file."
exitclean
@@ -1148,10 +1158,10 @@ if [ -n "$efi" ]; then
# the eltorito image, so try to extract it if it is missing
# test for presence of *.efi grub binary
- if [ ! -f $TGTMNT$EFI_BOOT/+(BOOT|boot)?*.efi ]; then
+ if [ ! -f $(nocase_path "$TGTMNT$EFI_BOOT/boot*efi") ]; then
if [ ! -x /usr/bin/dumpet ]; then
echo "No /usr/bin/dumpet tool found. EFI image will not boot."
- echo "Source media is missing grub binary in /EFI/BOOT/*efi"
+ echo "Source media is missing grub binary in /EFI/BOOT/*EFI"
exitclean
else
# dump the eltorito image with dumpet, output is $SRC.1
@@ -1159,10 +1169,10 @@ if [ -n "$efi" ]; then
EFIMNT=$(mktemp -d /media/srctmp.XXXXXX)
mount -o loop "$SRC".1 $EFIMNT
- if [ -f $EFIMNT$EFI_BOOT/+(BOOT|boot)?*.efi ]; then
- cp $EFIMNT$EFI_BOOT/+(BOOT|boot)?*.efi $TGTMNT$EFI_BOOT
+ if [ -f $(nocase_path "$EFIMNT$EFI_BOOT/boot*efi") ]; then
+ cp $(nocase_path "$EFIMNT$EFI_BOOT/boot*efi") $TGTMNT$EFI_BOOT
else
- echo "No BOOT*.efi found in eltorito image. EFI will not boot"
+ echo "No BOOT*.EFI found in eltorito image. EFI will not boot"
umount $EFIMNT
rm "$SRC".1
exitclean
Show replies by date