summaryrefslogtreecommitdiff
path: root/package/base-files/files/init.d/cifs
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-20 17:42:34 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-11-25 01:49:36 +0100
commitb0f23d1e562e753cb78a473fdade956a25cc337b (patch)
treefe4a5908d1e39e24ec6df66052e866ed72421a79 /package/base-files/files/init.d/cifs
parent49a817b44be5695a87f6b4c8eadef3bb0f9419f9 (diff)
finalize systemd as alternative init system
Most important is the fix in patch-src_journal_journald-server_c, which breaks startup of systemd-journald when code is compiled with -DNDEBUG. A lot of base-files reorganizing to only install required files on sysv systems.
Diffstat (limited to 'package/base-files/files/init.d/cifs')
-rw-r--r--package/base-files/files/init.d/cifs39
1 files changed, 39 insertions, 0 deletions
diff --git a/package/base-files/files/init.d/cifs b/package/base-files/files/init.d/cifs
new file mode 100644
index 000000000..b3ca9c649
--- /dev/null
+++ b/package/base-files/files/init.d/cifs
@@ -0,0 +1,39 @@
+#!/bin/sh
+#INIT 60
+
+case $1 in
+autostop) ;;
+autostart)
+ exec sh $0 start
+ ;;
+start)
+ grep -v "^#" /etc/fstab | grep cifs >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ grep cifs /proc/filesystems >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ mntpoints=$(grep -v "^#" /etc/fstab| grep cifs|awk '{ print $2 }')
+ for mntpoint in $mntpoints; do
+ mkdir -p $mntpoint
+ done
+ mount -a -t cifs
+ else
+ logger -s -t cifs "No cifs support in kernel"
+ fi
+ 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 $?