[Fedora-livecd-list] tools/livecd-iso-to-disk.sh

Bruno Wolff III bruno at fedoraproject.org
Tue Sep 14 03:00:29 UTC 2010


 tools/livecd-iso-to-disk.sh |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 09e2a07fca5cb43ee19afe500c75a5ea20ae7114
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Mon Sep 13 21:55:34 2010 -0500

    Missing parts of regex fix patch

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 6023509..00f201a 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -70,7 +70,7 @@ getdisk() {
 }
 
 resetMBR() {
-    if [[ "$DEV" =~ "/dev/loop*" ]]; then
+    if isdevloop "$DEV"; then
        return
     fi
     getdisk $1
@@ -129,7 +129,7 @@ checkPartActive() {
     if [ "$dev" = "$device" ]; then
 	return
     fi
-    if [[ "$dev" =~ "/dev/loop*" ]]; then
+    if isdevloop "$DEV"; then
         return
     fi
 
@@ -189,7 +189,11 @@ createMSDOSLayout() {
     partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:)
     size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
     /sbin/parted --script $device unit b mkpart primary fat32 17408 $(($size - 17408)) set 1 boot on
-    USBDEV=${device}1
+    if ! isdevloop "$DEV"; then
+        USBDEV=${device}1
+    else
+        USBDEV=${device}
+    fi
     # Sometimes automount can be _really_ annoying.
     echo "Waiting for devices to settle..."
     /sbin/udevadm settle




More information about the livecd mailing list