2 # nfs This shell script starts and stops the nfs services in a distribution
5 # description: starts and stops nfs client services
6 # chkconfig: 2345 60 86
8 # Copyright (c) 2000-2001 Mission Critical Linux, Inc.
11 PATH=/sbin:/bin:/usr/sbin:/usr/bin
15 SCRIPT_NAME=`basename $0`
17 # Grab our daemon functions.
18 . `dirname $0`/nfs-functions
20 # Kernel daemons and options
21 PREFIX="rpc." # Prefix for kernel execs (usually "rpc.")
24 # User daemons and options
25 STATD="rpc.statd" # NLM Server
27 # We use "type -path" instead of "which" since it's internal to bash.
28 [ -x "`type -path $STATD`" ] || exit 0
29 [ -x "`type -path $PREFIX$LOCKD`" ] || exit 0
31 # Handle how we were called.
34 # Start rpc.statd daemon without options...
35 echo -n "Starting $STATD: "
38 echo -n "Starting $LOCKD: "
39 startdaemon $PREFIX$LOCKD
41 # if this lock file doesn't exist, init won't even try to run
42 # the shutdown script for this service on RedHat systems!
43 # on non-RedHat systems, /var/lock/subsys may not exist.
44 touch /var/lock/subsys/$SCRIPT_NAME &> /dev/null
48 echo -n "Stopping $STATD: "
51 echo -n "Stopping $LOCKD: "
54 rm -f /var/lock/subsys/$SCRIPT_NAME
70 echo "Usage: $0 {start|stop|status|restart}"