summaryrefslogtreecommitdiff
path: root/package/cifs-utils/files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-06 13:55:46 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-06 13:55:46 +0200
commitd5b24a44dea12ff7158778e65b8a1772a534a89e (patch)
treeb1197a31fb098f9bf1725791f0b87847979050b3 /package/cifs-utils/files
parent261a153f548678dfabbb205f9596ebfa110a6b94 (diff)
update to latest upstream
Diffstat (limited to 'package/cifs-utils/files')
-rw-r--r--package/cifs-utils/files/cifs.init36
1 files changed, 36 insertions, 0 deletions
diff --git a/package/cifs-utils/files/cifs.init b/package/cifs-utils/files/cifs.init
new file mode 100644
index 000000000..8cc5783e2
--- /dev/null
+++ b/package/cifs-utils/files/cifs.init
@@ -0,0 +1,36 @@
+#!/bin/sh
+#PKG cifs-utils
+#INIT 60
+
+case $1 in
+autostop) ;;
+autostart)
+ exec sh $0 start
+ ;;
+start)
+ 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
+ else
+ logger -t cifs -s "No cifs support in kernel"
+ fi
+ ;;
+stop)
+ grep -v "^#" /etc/fstab| grep cifs >/dev/null 2>&1
+ if [ $? -eq 0 ];then
+ umount -a -t cifs
+ fi
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?