]> gitweb.fluxo.info Git - hydra.git/commitdiff
Provision: fix reboot_device
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Jul 2018 16:39:21 +0000 (13:39 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Jul 2018 16:39:21 +0000 (13:39 -0300)
share/hydractl/provision

index 5c3e5741d85287ec469770271e7c5b2822236bb3..14a647d94918ec4b3aa734f5ba279f0e405c68f8 100755 (executable)
@@ -204,8 +204,13 @@ else
     boot_device="$device"2
     syst_device="$device"3
 
-    # Use absolute path
-    reboot_device="`blkid | grep ^$boot_device: | cut -d ' ' -f 2 | sed -e 's/"//g'`"
+    # Use UUID
+    # Give time to devices table be updated
+    #sleep 2
+    #reboot_device="`blkid | grep ^$boot_device: | cut -d ' ' -f 2 | sed -e 's/"//g'`"
+
+    # Use device name
+    reboot_device="$boot_device"
   fi
 fi
 
@@ -400,7 +405,8 @@ fi
 
 # Fstab.
 echo "Configuring fstab..."
-echo "" | $SUDO tee $WORK/etc/fstab > /dev/null
+hydra_sudo_run touch $WORK/etc/fstab
+#echo "" | $SUDO tee $WORK/etc/fstab > /dev/null
 if [ "$swap_size" != "0" ]; then
   cat <<-EOF | $SUDO tee -a $WORK/etc/fstab > /dev/null
 /dev/mapper/swap      none           swap  sw                                 0 0