|
@@ -223,6 +223,9 @@ unmount(){
|
|
|
! mountpoint -q $mnt/dev/pts || umount $mnt/dev/pts
|
|
|
! mountpoint -q $mnt/dev || umount $mnt/dev
|
|
|
! mountpoint -q $mnt/root || umount $mnt/root
|
|
|
+! mountpoint -q $mnt || umount $mnt
|
|
|
+# Delete mount-point if empty and not mounted
|
|
|
+[ -z "$(ls -A /mnt/)" ] && ! mountpoint -q /mnt && rm -R $mnt
|
|
|
}
|
|
|
|
|
|
|