summaryrefslogtreecommitdiff
path: root/scripts/trymount.sh
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-04-12 06:40:39 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-04-12 12:51:33 +0200
commita3437967a2ae4730ba638cc80328055e9805e7c9 (patch)
tree6e824f088920bb59fd00e0c3b03dcdbf859f74c1 /scripts/trymount.sh
parent55d4a328c9fa369611115a066f4f305f2b74dafd (diff)
Rely on PATH variable for running init programs
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'scripts/trymount.sh')
-rw-r--r--scripts/trymount.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/trymount.sh b/scripts/trymount.sh
new file mode 100644
index 0000000..9be77f6
--- /dev/null
+++ b/scripts/trymount.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -d "$1" ]; then
+ if grep -qsE "[[:space:]]+$2$" "/proc/filesystems"; then
+ mount -n -t "$2" -o "$3" "$2" "$1"
+ fi
+fi