]> git.pld-linux.org Git - packages/nfs-utils.git/commitdiff
NFS patches ...
authorwojtek <wojtek@pld.org.pl>
Tue, 26 Jan 1999 18:51:24 +0000 (18:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    nfs.init -> 1.1

nfs.init [new file with mode: 0644]

diff --git a/nfs.init b/nfs.init
new file mode 100644 (file)
index 0000000..a4409af
--- /dev/null
+++ b/nfs.init
@@ -0,0 +1,62 @@
+#!/bin/bash
+#
+# nfs           This shell script takes care of starting and stopping
+#               the NFS services. Later we might add NIS too.
+#
+# chkconfig: 345 60 20
+# description: NFS is a popular protocol for file sharing across TCP/IP \
+#              networks. This service provides NFS server functionality, \
+#              which is configured via the /etc/exports file.
+# probe: true
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Check that networking is up.
+[ ${NETWORKING} = "no" ] && exit 0
+
+# Try to define nicelevel ...
+NICE="nice -n 5"
+
+[ -f /usr/sbin/rpc.nfsd ] || exit 0
+[ -f /usr/sbin/rpc.mountd ] || exit 0
+[ -f /etc/exports ] || exit 0
+
+# See how we were called.
+case "$1" in
+  start)
+       # Start daemons.
+       echo -n "Starting NFS services: "
+       $NICE rpc.mountd
+       $NICE rpc.nfsd
+       echo done
+       touch /var/lock/subsys/nfs
+       ;;
+  stop)
+       # Stop daemons.
+       echo -n "Shutting down NFS services: "
+       killall -TERM rpc.mountd
+       killall -TERM rpc.nfsd
+       echo done
+       rm -f /var/lock/subsys/nfs
+       ;;
+  status)
+       status rpc.mountd
+       status rpc.nfsd
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|status|restart}"
+       exit 1
+esac
+
+exit 0
+
This page took 0.09456 seconds and 4 git commands to generate.