Added Thomas Perl's patches to Fremantle scripts
[easy-deb-chroot] / fremantle / easy-chroot / src / sbin / qumount
index d57ae19..03701a0 100755 (executable)
@@ -19,7 +19,7 @@ if [ "x$MNTPT" = x ] ; then
   MNTPT=$CHROOT
   #Still not set? FAIL
   if [ "x$MNTPT" != x ] ; then
-    echo "No mountpoint to unmount!"
+    echo "No mountpoint to unmount!" >/dev/stderr
     exit 8
   fi
 fi
@@ -28,31 +28,31 @@ fi
 TEST1=`mount | grep " $MNTPT "`
 
 if [ "x$TEST1" != "x" ] ; then
-  echo "..Unmounting $MNTPT..."
+  echo "..Unmounting $MNTPT..." >/dev/stderr
   umount -ld "$MNTPT"
 
   TEST2=`mount | grep " $MNTPT "`
 
   if [ "x$TEST2" != "x" ] ; then
-    echo "...$MNTPT didn't unmount!"
+    echo "...$MNTPT didn't unmount!" >/dev/stderr
     exit 8
   fi
 else
-  echo "$MNTPT is not mounted; Check for trailing slashes."
+  echo "$MNTPT is not mounted; Check for trailing slashes." >/dev/stderr
 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)..."
+    echo "..Unmounting turbo loop ($LOOPNO)..." >/dev/stderr
     dmlosetup -d /dev/loop$LOOPNO
     if [ "$?" != 0 ] || [ "x`dmsetup status | grep loop$LOOPNO`" != "x" ] ; then
-      echo "Waiting for apps to terminate, will try again."
+      echo "Waiting for apps to terminate, will try again." >/dev/stderr
       sleep 5
       dmlosetup -d /dev/loop$LOOPNO 
       if [ "$?" != 0 ] ; then
-        echo "Can't unmount turbo-loop! Try dmlosetup -d /dev/loop$LOOPNO manually."
+        echo "Can't unmount turbo-loop! Try dmlosetup -d /dev/loop$LOOPNO manually." >/dev/stderr
         exit 9
       fi
     fi
@@ -60,5 +60,5 @@ if [ ! "x`grep device-mapper /proc/misc`" = "x" ] ; then
   done
 fi
 
-echo "successful unmount..."
-exit 0
\ No newline at end of file
+echo "successful unmount..." >/dev/stderr
+exit 0