summaryrefslogtreecommitdiff
path: root/package/base-files/src/etc/init.d/fs
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/src/etc/init.d/fs')
-rw-r--r--package/base-files/src/etc/init.d/fs20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/src/etc/init.d/fs
new file mode 100644
index 000000000..75ae760e0
--- /dev/null
+++ b/package/base-files/src/etc/init.d/fs
@@ -0,0 +1,20 @@
+#!/bin/sh
+#INIT 60
+[[ $1 = autostart ]] || exit 0
+
+# mount net filesystems (nfs/cifs)
+grep nfs /proc/filesystems >/dev/null 2>&1
+if [ $? -eq 0 ];then
+ grep -v "^#" /etc/fstab| grep nfs >/dev/null 2>&1
+ if [ $? -eq 0 ];then
+ mount -a -t nfs
+ fi
+fi
+grep cifs /proc/filesystems >/dev/null 2>&1
+if [ $? -eq 0 ];then
+ grep -v "^#" /etc/fstab| grep cifs >/dev/null 2>&1
+ if [ $? -eq 0 ];then
+ mount -a -t cifs
+ fi
+fi
+exit 0