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