docs/livecd-iso-to-disk.pod |    4 +++-
 tools/livecd-iso-to-disk.sh |   18 ++++++++++--------
 2 files changed, 13 insertions(+), 9 deletions(-)

New commits:
commit 5ec830d5a4977a6391ab5795e9f820b8fdccd079
Author: Bruno Wolff III <[email protected]>
Date:   Sat Sep 11 16:53:10 2010 -0500

    Change --skipcopy to not overwrite other large areas.
    
    This will allow faster boot configuration testing when there are
    home dorectory, overlay or swap areas on the device.

diff --git a/docs/livecd-iso-to-disk.pod b/docs/livecd-iso-to-disk.pod
index c673eef..bbb54f2 100644
--- a/docs/livecd-iso-to-disk.pod
+++ b/docs/livecd-iso-to-disk.pod
@@ -44,7 +44,9 @@ Disables the encryption of the home directory.
 
 =item --skipcopy
 
-Skips the copy of the live image to the USB stick.
+Skips the copy of the live image to the USB stick and disables the --forma, 
--home-size-mb, and --swap-size-mb options. The --overlay-size-mb option is 
changed to only reinitialize the existing overlay area, to recreate it from 
scratch.
+
+The intended use of this option is to speed up testing of the boot 
configuration of live images.
 
 =item --efi
 
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 007348a..fdfb5e3 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -448,7 +448,7 @@ fi
 
 # do some basic sanity checks.  
 checkMounted $USBDEV
-if [ -n "$format" ];then
+if [ -n "$format" -a -z "$skipcopy" ];then
   checkLVM $USBDEV
   # checks for a valid filesystem
   if [ -n "$efi" ];then
@@ -599,7 +599,7 @@ fi
 [ -n "$efi" -a ! -d $USBMNT/EFI/boot ] && mkdir -p $USBMNT/EFI/boot
 
 # Live image copy
-if [ -z "$skipcopy" ] && [ "$isotype" = "live" ]; then
+if [ "$isotype" = "live" -a -z "$skipcopy" ]; then
   echo "Copying live image to USB stick"
   [ ! -d $USBMNT/$LIVEOS ] && mkdir $USBMNT/$LIVEOS
   [ -n "$keephome" -a -f "$USBMNT/$HOMEFILE" ] && mv $USBMNT/$HOMEFILE 
$USBMNT/$LIVEOS/$HOMEFILE
@@ -655,23 +655,25 @@ fi
 if [ "$overlaysizemb" -gt 0 ]; then
     echo "Initializing persistent overlay file"
     OVERFILE="overlay-$( /sbin/blkid -s LABEL -o value $USBDEV )-$( 
/sbin/blkid -s UUID -o value $USBDEV )"
-    if [ "$USBFS" = "vfat" ]; then
-       # vfat can't handle sparse files
-       dd if=/dev/zero of=$USBMNT/$LIVEOS/$OVERFILE count=$overlaysizemb bs=1M
-    else
+    if [ -z "$skipcopy" ]; then
+      if [ "$USBFS" = "vfat" ]; then
+        # vfat can't handle sparse files
+        dd if=/dev/zero of=$USBMNT/$LIVEOS/$OVERFILE count=$overlaysizemb bs=1M
+      else
        dd if=/dev/null of=$USBMNT/$LIVEOS/$OVERFILE count=1 bs=1M 
seek=$overlaysizemb
+      fi
     fi
     sed -i -e "s/liveimg/liveimg overlay=${USBLABEL}/" $BOOTCONFIG 
$BOOTCONFIG_EFI
     sed -i -e "s/\ ro\ /\ rw\ /" $BOOTCONFIG  $BOOTCONFIG_EFI
 fi
 
-if [ "$swapsizemb" -gt 0 ]; then
+if [ "$swapsizemb" -gt 0 -a -z "$skipcopy" ]; then
     echo "Initializing swap file"
     dd if=/dev/zero of=$USBMNT/$LIVEOS/swap.img count=$swapsizemb bs=1M
     mkswap -f $USBMNT/$LIVEOS/swap.img
 fi
 
-if [ "$homesizemb" -gt 0 ]; then
+if [ "$homesizemb" -gt 0 -a -z "$skipcopy" ]; then
     echo "Initializing persistent /home"
     homesource=/dev/zero
     [ -n "$cryptedhome" ] && homesource=/dev/urandom


--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to