mostly fixes
[distro-setup] / schrootupdate
index 8d3d1e9ced18a9e8ba630197e7b94e72baa5472f..182371ea5beaf82cc53427eec20935420094c3ed 100755 (executable)
@@ -23,7 +23,9 @@ if [[ ! $dev ]]; then
   exit 0
 fi
 mkdir -p /mnt/tmptimer
-mount -o subvol=debianbullseye_bootstrap $dev /mnt/tmptimer
+if ! mountpoint /mnt/tmptimer &>/dev/null; then
+  mount -o subvol=debianbullseye_bootstrap $dev /mnt/tmptimer
+fi
 cd /mnt/tmptimer
 for d in dev proc sys dev/pts; do
   [[ -d $d ]]
@@ -39,3 +41,5 @@ for d in dev/pts dev proc sys; do
     umount $d
   fi
 done
+cd /
+umount /mnt/tmptimer