]> git.parisson.com Git - clone-me.git/commitdiff
fix umount
authorGuillaume Pellerin <guillaume.pellerin@free.fr>
Mon, 29 Jan 2024 13:34:41 +0000 (14:34 +0100)
committerGuillaume Pellerin <guillaume.pellerin@free.fr>
Mon, 29 Jan 2024 13:34:41 +0000 (14:34 +0100)
tc_clone_nuc_nv_efi.sh

index 57c441f3ac9db2bf42f1bae4a6a9561ea438ba4b..2b56b8514747dd0a863348fdd2b95777f55f26bc 100755 (executable)
@@ -26,15 +26,26 @@ do
     esac
 done
 
+# UMOUNT
+DIR=$CLONE/home
+if [ d $DIR ]; then
+    umount $DIR
+fi
+DIR=$CLONE/var
+if [ d $DIR ]; then
+    umount $DIR
+fi
+DIR=$CLONE/boot/efi
+if [ d $DIR ]; then
+    umount $DIR
+fi
+
+
 CLONE=/mnt/$ID
 if [ ! -d $CLONE ]; then
  mkdir $CLONE
 fi
 
-umount /dev/$HOME_PART $$CLONE/home
-umount /dev/$VAR_PART $CLONE/var
-umount /dev/$ROOT_PART $CLONE
-umount /dev/$EFI_PART
 
 if [ $PARTITIONS ]; then
     sfdisk /dev/$DISK < $PARTITIONS