Updated uuid_fix to make uuid symlinks so grub2-mkconfig works correctly
Kyle Sheumaker [Fri, 21 Sep 2018 22:50:50 +0000 (17:50 -0500)]
etc/cloner3/uuid_fix.sh

index f8f1c05..cab39e6 100755 (executable)
@@ -8,7 +8,7 @@
 ORG_UUID_FILE="/cloner/setup/device_uuid"
 NEW_UUID_FILE="/tmp/dest_uuid_map"
 
-blkid -s UUID > /tmp/dest_uuid_map
+blkid > /tmp/dest_uuid_map
 
 new_uuid_by_device() {
        DEVICE=$1
@@ -124,4 +124,23 @@ then
 
 fi
 
+header "Editing disk by UUID links"
+mkdir -p /dev/disk/by-uuid
+while read line
+do
+
+       DEVICE=$(echo ${line} | cut -d":" -f1)
+       UUID=$(echo ${line} | cut -d" " -f2 | sed 's/\"//g' | sed 's/^UUID=//i' )
+       msg -n "Creating UUID link for ${DEVICE}"
+
+       if [ -e /dev/disk/by-uuid/${UUID} ]
+       then
+               rm -f /dev/disk/by-uuid/${UUID}
+       fi
+       ln -s -f ${DEVICE} /dev/disk/by-uuid/${UUID}
+
+       ok_msg
+
+done < ${NEW_UUID_FILE}
+
 exit 0