Fremantle versions pushed to Extras
[easy-deb-chroot] / fremantle / easy-chroot / src / sbin / closechroot
index eda7e9e..2892bcf 100755 (executable)
@@ -30,7 +30,8 @@ fi
 echo "Closing the chroot..."
 
 # Fremantle's fuser command is broken.
-# Using Debian's one instead.
+# We can either use Debian's one instead (as gfuser),
+# or we can use the workaround: "cd /proc" first.
 
 echo "...closing chroot apps..."
 
@@ -39,12 +40,14 @@ if [ "x$TEST1" != "x" ] ; then
   if [ -f "/bin/gfuser" ] ; then
     gfuser -m "$CHROOT" -k
   else
+    cd /proc
     fuser -m "$CHROOT" -k
   fi
 else
   if [ -f "/bin/gfuser" ] ; then
     gfuser "$CHROOT" -k
   else
+    cd /proc
     fuser "$CHROOT" -k
   fi
 fi