Add support for fat filesystems (for EFI boot partition)
Kyle Sheumaker [Mon, 4 Jun 2018 20:07:14 +0000 (15:07 -0500)]
etc/cloner3/prep_disks.sh

index 1029660..080ba34 100755 (executable)
@@ -389,6 +389,24 @@ do
 
                case "${FS_TYPE}"
                in
+                        vfat|fat32|fat16|fat|msdos)
+                                       CMD="/sbin/mkfs.vfat ${FS_DEVICE}"
+                                       if [ "${FS_LABEL}" != "" ]
+                                       then
+                                               CMD="/sbin/mkfs.vfat -n ${FS_LABEL} ${FS_DEVICE}"
+                                       fi
+
+                                       $CMD >> /tmp/stdout.log 2>> /tmp/stderr.log
+                                       if [ "$?" = "0" ]
+                                       then
+                                               # try to tune it out of fsck's but dont care if it fails
+                                               ok_msg
+                                       else
+                                               fail_msg
+                                               clone_fatal_error "Failed to make ${FS_TYPE} filesystem on ${FS_DEVICE}"
+                                       fi
+                               ;;
+
                        ext4)
                                        CMD="/usr/bin/mke2fs -F -T ext4 ${FS_DEVICE}"
                                        if [ "${FS_LABEL}" != "" ]