Browse Source

'bootstrap-bookworm.sh' ändern

Toastie 1 year ago
parent
commit
433de20715
1 changed files with 3 additions and 1 deletions
  1. 3 1
      bootstrap-bookworm.sh

+ 3 - 1
bootstrap-bookworm.sh

@@ -314,13 +314,15 @@ esac
 
 
 unmount(){
 unmount(){
 # Unmount if mounted
 # Unmount if mounted
+# Remark: Function called unmount and not umount to avoid collision with the command
 ! mountpoint -q $mnt/proc     || umount -v $mnt/proc
 ! mountpoint -q $mnt/proc     || umount -v $mnt/proc
 ! mountpoint -q $mnt/sys      || umount -v $mnt/sys
 ! mountpoint -q $mnt/sys      || umount -v $mnt/sys
 ! mountpoint -q $mnt/dev/pts  || umount -v $mnt/dev/pts
 ! mountpoint -q $mnt/dev/pts  || umount -v $mnt/dev/pts
 ! mountpoint -q $mnt/dev      || umount -v $mnt/dev
 ! mountpoint -q $mnt/dev      || umount -v $mnt/dev
 ! mountpoint -q $mnt          || umount -v $mnt
 ! mountpoint -q $mnt          || umount -v $mnt
 # Delete mount-point if empty and not mounted
 # Delete mount-point if empty and not mounted
-[ -d $mnt ] && [ -z "$(ls -A $mnt)" ] && ! mountpoint -q $mnt && rm -R $mnt
+[ -d $mnt ] && [ -z "$(ls -A $mnt)" ] && ! mountpoint -q $mnt \
+&& rm -R $mnt && echo "mountpoint $mnt deleted" 
 }
 }