summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-17 20:06:34 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-18 09:29:30 +0200
commitc9a479c25d2b38eea740adbeac6c96629b407b00 (patch)
treecf4b651d9f087868ab4e9bb17702ddcc8d977aea /package/base-files
parent40c491783c3268dc6a2e6d737939d0ebe77469f0 (diff)
move cifs/nfs startup script back to base-files
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/Makefile2
-rw-r--r--package/base-files/src/etc/init.d/cifs35
-rw-r--r--package/base-files/src/etc/init.d/nfs40
3 files changed, 76 insertions, 1 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index b665a989c..57f11a3ac 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk
PKG_NAME:= base-files
PKG_VERSION:= 1.0
-PKG_RELEASE:= 91
+PKG_RELEASE:= 92
PKG_SECTION:= base
PKG_DESCR:= basic files and scripts
diff --git a/package/base-files/src/etc/init.d/cifs b/package/base-files/src/etc/init.d/cifs
new file mode 100644
index 000000000..ca310d70d
--- /dev/null
+++ b/package/base-files/src/etc/init.d/cifs
@@ -0,0 +1,35 @@
+#!/bin/sh
+#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 $?
diff --git a/package/base-files/src/etc/init.d/nfs b/package/base-files/src/etc/init.d/nfs
new file mode 100644
index 000000000..b1bce59e6
--- /dev/null
+++ b/package/base-files/src/etc/init.d/nfs
@@ -0,0 +1,40 @@
+#!/bin/sh
+#INIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${rpcbind:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ 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
+ mkdir -p /var/lib/nfs/rpc_pipefs
+ mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+ mount -a -t nfs
+ fi
+ else
+ logger -s "No nfs support in kernel"
+ fi
+ ;;
+stop)
+ grep -v "^#" /etc/fstab| grep nfs >/dev/null 2>&1
+ if [ $? -eq 0 ];then
+ umount -a -t nfs
+ umount /var/lib/nfs/rpc_pipefs
+ fi
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?