|
@@ -313,8 +313,8 @@ unmount(){
|
|
|
! mountpoint -q $mnt/boot/efi || umount $mnt/boot/efi
|
|
|
! mountpoint -q $mnt || umount $mnt
|
|
|
# Delete mount-point if empty and not mounted
|
|
|
-[ -z "$(ls -A $mnt)" ] && ! mountpoint -q $mnt && rm -R $mnt
|
|
|
-[ -z "$(ls -A $mnt/boot/efi)" ] && ! mountpoint -q $mnt/boot/efi && rm -R $mnt/boot/efi
|
|
|
+[ -d $mnt ] && [ -z "$(ls -A $mnt)" ] && ! mountpoint -q $mnt && rm -R $mnt
|
|
|
+[ -d $mnt/boot/efi ] && [ -z "$(ls -A $mnt/boot/efi)" ] && ! mountpoint -q $mnt/boot/efi && rm -R $mnt/boot/efi
|
|
|
}
|
|
|
|
|
|
|