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 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
14 # Source function library.
15 . /etc/rc.d/init.d/functions
17 # Source networking configuration.
18 . /etc/sysconfig/network
20 # Check that networking is up.
21 [ ${NETWORKING} = "no" ] && exit 0
23 # Try to define nicelevel ...
26 [ -f /usr/sbin/rpc.nfsd ] || exit 0
27 [ -f /usr/sbin/rpc.mountd ] || exit 0
28 [ -f /etc/exports ] || exit 0
30 # See how we were called.
34 echo -n "Starting NFS services: "
38 touch /var/lock/subsys/nfs
42 echo -n "Shutting down NFS services: "
43 killall -TERM rpc.mountd
44 killall -TERM rpc.nfsd
46 rm -f /var/lock/subsys/nfs
57 echo "Usage: $0 {start|stop|status|restart}"