3 # nfs This shell script takes care of starting and stopping
4 # the NFS services. Later we might add NIS too.
7 # description: NFS is a popular protocol for file sharing across TCP/IP \
8 # networks. This service provides NFS server functionality, \
9 # which is configured via the /etc/exports file.
12 # Source function library.
13 . /etc/rc.d/init.d/functions
15 # Source networking configuration.
16 . /etc/sysconfig/network
18 # Check that networking is up.
19 [ "${NETWORKING}" = "no" ] && exit 0
21 [ -f /usr/sbin/rpc.nfsd ] || exit 0
22 [ -f /usr/sbin/rpc.mountd ] || exit 0
23 [ -f /etc/exports ] || exit 0
25 # Source networking configuration
26 if [ -f /etc/sysconfig/nfs ]; then
29 # See how we were called.
33 show Starting rpc.mountd
35 show Starting rpc.nfsd
37 touch /var/lock/subsys/nfs
41 show Shutting down rpc.mountd
43 show Shutting down rpc.nfsd
45 rm -f /var/lock/subsys/nfs
56 echo "Usage: $0 {start|stop|status|restart}"