From: Silvio Rhatto Date: Tue, 3 Jul 2018 16:39:21 +0000 (-0300) Subject: Provision: fix reboot_device X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=a8b706ccdab40635d7a48bcc85df3176cd24c0d8;p=hydra.git Provision: fix reboot_device --- diff --git a/share/hydractl/provision b/share/hydractl/provision index 5c3e574..14a647d 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -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