[Fedora-livecd-list] 3 commits - Makefile tools/livecd-iso-to-disk.sh tools/liveimage-mount

Brian C. Lane bcl at fedoraproject.org
Thu Nov 3 22:58:30 UTC 2011


 Makefile                    |    2 +-
 tools/livecd-iso-to-disk.sh |   39 +++++++++++++++++++++++----------------
 tools/liveimage-mount       |    2 +-
 3 files changed, 25 insertions(+), 18 deletions(-)

New commits:
commit 1691e925198580b778e1233eb741146bd2d0c8c1
Author: Brian C. Lane <bcl at redhat.com>
Date:   Thu Nov 3 15:57:33 2011 -0700

    Version 17.2

diff --git a/Makefile b/Makefile
index d47a466..c2617f8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 
-VERSION = 17.1
+VERSION = 17.2
 
 INSTALL = /usr/bin/install -c
 INSTALL_PROGRAM = ${INSTALL}


commit 22c8cbe7a4d9d9dda0806252393e0ea4bd5ce7d2
Author: Brian C. Lane <bcl at redhat.com>
Date:   Thu Nov 3 14:34:51 2011 -0700

    Fix indent and typo in liveimage-mount (#749643)

diff --git a/tools/liveimage-mount b/tools/liveimage-mount
index 80d67d1..185f070 100755
--- a/tools/liveimage-mount
+++ b/tools/liveimage-mount
@@ -272,7 +272,7 @@ def main():
             if os.path.ismount(destmnt):
                 call(['/bin/umount', destmnt])
             if img_type is 'blk':
-     m_cow:
+                if dm_cow:
                     call(['/sbin/dmsetup', '--noudevrules', '--noudevsync',
                           'remove', dm_cow])
                 if overlayloop:


commit 47e8800d6ece3472de1abf1bc09e020fd02eb47e
Author: Brian C. Lane <bcl at redhat.com>
Date:   Thu Nov 3 14:06:40 2011 -0700

    Make sure the target is labeled LIVE (#751213)
    
    Anaconda needs to be able to find the boot device. It does this by
    looking for the filesystem labeled LIVE. Previously we set the label
    when formatting, but now we always set it to LIVE, even when not
    formatting.

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 9c8c878..2db2903 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -534,27 +534,34 @@ checkFilesystem() {
         fi
     fi
 
-
-    TGTLABEL=$(/sbin/blkid -s UUID -o value $dev)
-    if [ -n "$TGTLABEL" ]; then
-        TGTLABEL="UUID=$TGTLABEL"
-    else
-        TGTLABEL=$(/sbin/blkid -s LABEL -o value $dev)
-        if [ -n "$TGTLABEL" ]; then
-            TGTLABEL="LABEL=$TGTLABEL"
-        else
-            echo "Need to have a filesystem label or UUID for your target device"
-            if [ "$TGTFS" = "vfat" -o "$TGTFS" = "msdos" ]; then
-                echo "Label can be set with /sbin/dosfslabel"
-            elif [ "$TGTFS" = "ext2" -o "$TGTFS" = "ext3" -o "$TGTFS" = "ext4" ]; then
-                echo "Label can be set with /sbin/e2label"
-            elif [ "$TGTFS" = "btrfs" ]; then
-                echo "Eventually you'll be able to use /sbin/btrfs filesystem label to add a label."
+    TGTLABEL=$(/sbin/blkid -s LABEL -o value $dev)
+    if [ "$TGTLABEL" != "LIVE" ]; then
+        if [ "$TGTFS" = "vfat" -o "$TGTFS" = "msdos" ]; then
+            /sbin/dosfslabel $dev LIVE
+            if [ $? -gt 0 ]; then
+                echo "dosfslabel failed on $dev, device not setup"
+                exitclean
+            fi
+        elif [ "$TGTFS" = "ext2" -o "$TGTFS" = "ext3" -o "$TGTFS" = "ext4" ]; then
+            /sbin/e2label $dev LIVE
+            if [ $? -gt 0 ]; then
+                echo "e2label failed on $dev, device not setup"
+                exitclean
             fi
+        else
+            echo "Unknown filesystem type. Try setting its label to LIVE and re-running"
             exitclean
         fi
     fi
 
+    # Use UUID if available
+    TGTUUID=$(/sbin/blkid -s UUID -o value $dev)
+    if [ -n "$TGTUUID" ]; then
+        TGTLABEL="UUID=$TGTUUID"
+    else
+        TGTLABEL="LABEL=LIVE"
+    fi
+
     if [ "$TGTFS" = "vfat" -o "$TGTFS" = "msdos" ]; then
         mountopts="-o shortname=winnt,umask=0077"
     fi




More information about the livecd mailing list