Easy Chroot 0.3.1
[easy-deb-chroot] / fremantle / easy-chroot / src / sbin / qumount
index 03701a0..db98974 100755 (executable)
@@ -24,6 +24,12 @@ if [ "x$MNTPT" = x ] ; then
   fi
 fi
 
+# Strip off a trailing slash
+LASTCHAR=`echo $MNTPT | cut -c ${#MNTPT}`
+if [ "$LASTCHAR" = "/" ] ; then
+   echo "..stripping trailing slash..." >/dev/stderr
+   MNTPT=`echo $MNTPT | cut -c 0-$((${#MNTPT}-1))`
+fi
 
 TEST1=`mount | grep " $MNTPT "`