aboutsummaryrefslogtreecommitdiff
path: root/rc.lib
diff options
context:
space:
mode:
Diffstat (limited to 'rc.lib')
-rw-r--r--rc.lib9
1 files changed, 9 insertions, 0 deletions
diff --git a/rc.lib b/rc.lib
index 6eed51b..898bb1c 100644
--- a/rc.lib
+++ b/rc.lib
@@ -75,3 +75,12 @@ parse_cmdline() {
esac
done
}
+
+mnt() {
+ [ -f /proc/mounts ] && while read -r _ mnt _; do
+ case "$mnt" in "$1") return 0; esac
+ done < /proc/mounts
+
+ mnt="$1"; shift
+ mount "$@" "$mnt" 2>&1 | log
+}