As successfully uploaded to Extras-devel from my N900
[easy-deb-chroot] / fremantle / easy-deb-chroot / thp / sbin / qumount
diff --git a/fremantle/easy-deb-chroot/thp/sbin/qumount b/fremantle/easy-deb-chroot/thp/sbin/qumount
deleted file mode 100755 (executable)
index d57ae19..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-#Unmount a mounted MNTPT.
-# By Alan M Bruce (qole)
-#
-# GPL licensed; keep code free!
-
-if [ "`whoami`" != "root" ] ; then
-  echo "please run me as root!"
-  exit 9
-fi
-
-#Try to get the MNTPT location from the first parameter
-MNTPT=$1
-
-#Try to get the MNTPT location from the config file... 
-if [ "x$MNTPT" = x ] ; then
-  #Pull in the config, if possible...
-  [ -f /home/user/.chroot ] && . /home/user/.chroot
-  MNTPT=$CHROOT
-  #Still not set? FAIL
-  if [ "x$MNTPT" != x ] ; then
-    echo "No mountpoint to unmount!"
-    exit 8
-  fi
-fi
-
-
-TEST1=`mount | grep " $MNTPT "`
-
-if [ "x$TEST1" != "x" ] ; then
-  echo "..Unmounting $MNTPT..."
-  umount -ld "$MNTPT"
-
-  TEST2=`mount | grep " $MNTPT "`
-
-  if [ "x$TEST2" != "x" ] ; then
-    echo "...$MNTPT didn't unmount!"
-    exit 8
-  fi
-else
-  echo "$MNTPT is not mounted; Check for trailing slashes."
-fi
-
-if [ ! "x`grep device-mapper /proc/misc`" = "x" ] ; then
-  LOOPDEV=`echo $TEST1 | cut -f1 -d' '`
-  while [ "x`echo $LOOPDEV | grep dm-`" != "x" ] ; do
-    LOOPNO=`echo $LOOPDEV | awk -F '-' '{print $NF}'`
-    echo "..Unmounting turbo loop ($LOOPNO)..."
-    dmlosetup -d /dev/loop$LOOPNO
-    if [ "$?" != 0 ] || [ "x`dmsetup status | grep loop$LOOPNO`" != "x" ] ; then
-      echo "Waiting for apps to terminate, will try again."
-      sleep 5
-      dmlosetup -d /dev/loop$LOOPNO 
-      if [ "$?" != 0 ] ; then
-        echo "Can't unmount turbo-loop! Try dmlosetup -d /dev/loop$LOOPNO manually."
-        exit 9
-      fi
-    fi
-    LOOPDEV=`mount | grep " $MNTPT " | cut -f1 -d' '`
-  done
-fi
-
-echo "successful unmount..."
-exit 0
\ No newline at end of file