various fixes
[distro-setup] / distro-end
index 3ebc231f1510932151f88ad263380034d2888de7..a30963f5d0e1240db3c5eff77dfbbecba08cbe71 100755 (executable)
@@ -1040,12 +1040,12 @@ tu /etc/hosts <<< "127.0.1.1 $(hostname).lan $(hostname)"
 rootdev=$(mount | sed -rn 's#^(\S+) on / .*#\1#p')
 s mkdir /mnt/root
 tu /etc/fstab <<< "$rootdev  /mnt/root  btrfs  noatime,subvolid=0  0 0"
-s mount /mnt/root || [[ $? == 32 ]]
+mountpoint /mnt/root || s mount /mnt/root
 idev=$(mount | sed -rn 's#^(\S+) on /i .*#\1#p')
 if [[ $idev != $rootdev ]]; then
     s mkdir /mnt/iroot
     tu /etc/fstab <<< "$idev  /mnt/iroot  btrfs  noatime,subvolid=0  0 0"
-    s mount /mnt/iroot || [[ $? == 32 ]]
+    mountpoint /mnt/iroot || s mount /mnt/iroot
 fi
 
 # Do this again because it occasionally has changes and