Author: baggins
Date: Mon Mar  9 18:47:57 2009
New Revision: 10179

Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
- use /proc/mounts if available for checking mounted fs


Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions      (original)
+++ rc-scripts/trunk/rc.d/init.d/functions      Mon Mar  9 18:47:57 2009
@@ -998,10 +998,15 @@
 
        [ -n "$fstype" -a -n "$mntpoint" ] || return 1
 
-       if [ "$(/bin/stat -L -f -c %T $mntpoint 2>/dev/null)" = "$fstype" ]; 
then
-               return 0
+       if [ -r /proc/mounts ]; then
+               LC_ALL=C grep -qE " $mntpoint +$fstype " /proc/mounts 
2>/dev/null
+               return $?
        else
-               return 1
+               if [ "$(/bin/stat -L -f -c %T $mntpoint 2>/dev/null)" = 
"$fstype" ]; then
+                       return 0
+               else
+                       return 1
+               fi
        fi
 }
 
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to