[Fedora-livecd-list] Branch 'f19-branch' - 2 commits - Makefile tools/livecd-iso-to-disk.sh

Brian C. Lane bcl at fedoraproject.org
Mon Oct 27 19:31:38 UTC 2014


 Makefile                    |    2 +-
 tools/livecd-iso-to-disk.sh |   24 +++++++++++++++++-------
 2 files changed, 18 insertions(+), 8 deletions(-)

New commits:
commit 25e990776f6f0b2d77779cdb0578c1741d99c826
Author: Brian C. Lane <bcl at redhat.com>
Date:   Mon Oct 27 12:30:53 2014 -0700

    Version 19.10

diff --git a/Makefile b/Makefile
index 26cc65e..ab32ebb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 
-VERSION = 19.9
+VERSION = 19.10
 
 INSTALL = /usr/bin/install -c
 INSTALL_PROGRAM = ${INSTALL}


commit 47738e4b080fe157c486b616abc43cac1813cf1b
Author: Brian C. Lane <bcl at 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)
    (cherry picked from commit a1c98271f03839364a8893559abf35748ca9d73f)

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 3187537..19b9353 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -301,6 +301,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
 
@@ -1120,8 +1130,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
@@ -1132,10 +1142,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
@@ -1143,10 +1153,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




More information about the livecd mailing list