Updated prep_disks to make labels of xfs and swap partitions
Kyle Sheumaker [Tue, 27 Jan 2015 18:23:49 +0000 (12:23 -0600)]
etc/cloner3/prep_disks.sh
etc/modules_other_early.conf [new file with mode: 0644]

index 5ff589d..7d5dd01 100755 (executable)
@@ -404,8 +404,14 @@ do
                                        fi
                                ;;
                        xfs)
-                                       /usr/bin/mkfs.xfs -f ${FS_DEVICE} \
-                                               >> /tmp/stdout.log 2>> /tmp/stderr.log
+                                       CMD="/usr/bin/mkfs.xfs -f ${FS_DEVICE}"
+                                       if [ "${FS_LABEL}" != "" ]
+                                       then    
+                                               CMD="/usr/bin/mkfs.xfs -f ${FS_DEVICE} -L ${FS_LABEL}"
+                                       fi
+       
+
+                                       $CMD >> /tmp/stdout.log 2>> /tmp/stderr.log
                                        if [ "$?" = "0" ]
                                        then
                                                ok_msg
@@ -428,8 +434,13 @@ do
                                        fi
                                ;;
                        swap)
-                                       /usr/bin/mkswap -f ${FS_DEVICE} \
-                                               >> /tmp/stdout.log 2>> /tmp/stderr.log
+                                       CMD="/usr/bin/mkswap -f ${FS_DEVICE}"
+                                       if [ "${FS_LABEL}" != "" ]
+                                       then    
+                                               CMD="/usr/bin/mkswap -f ${FS_DEVICE} -L ${FS_LABEL}"
+                                       fi
+       
+                                       $CMD >> /tmp/stdout.log 2>> /tmp/stderr.log
                                        if [ "$?" = "0" ]
                                        then
                                                ok_msg
diff --git a/etc/modules_other_early.conf b/etc/modules_other_early.conf
new file mode 100644 (file)
index 0000000..daae75d
--- /dev/null
@@ -0,0 +1,3 @@
+virtio_pci
+virtio_blk
+virtio_scsi