base/dracut-lib.sh: add ismounted()
authorHarald Hoyer <harald@redhat.com>
Mon, 11 Apr 2011 11:34:34 +0000 (13:34 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 11 Apr 2011 11:34:34 +0000 (13:34 +0200)
modules.d/99base/dracut-lib.sh

index e976351..6cb288b 100755 (executable)
@@ -330,6 +330,13 @@ udevproperty() {
     fi
 }
 
+ismounted() {
+    while read a m a; do
+        [ "$m" = "$1" ] && return 0
+    done < /proc/mounts
+    return 1
+}
+
 wait_for_if_up() {
     local cnt=0
     while [ $cnt -lt 20 ]; do