]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
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 e9763512516df2373ce9e94139498efeb4b98793..6cb288bdcb3160e108e332cd49f13c595a9b75e8 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