From 938a517677186659aaf615fc7b9ae913ee336372 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 29 Jan 2024 14:34:41 +0100 Subject: [PATCH] fix umount --- tc_clone_nuc_nv_efi.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tc_clone_nuc_nv_efi.sh b/tc_clone_nuc_nv_efi.sh index 57c441f..2b56b85 100755 --- a/tc_clone_nuc_nv_efi.sh +++ b/tc_clone_nuc_nv_efi.sh @@ -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 -- 2.39.5