blob: 22a165939b4b07d0d904ff981430a23269f8bbb9 (
plain)
1 #!/bin/sh
2 #
3 # /etc/rc.d/rpc.nfsd: start/stop nfs daemons
4 #
5
6 SSD=/sbin/start-stop-daemon
7 PROG=/usr/sbin/rpc.nfsd
8 NAME="nfsd"
9 OPTS="--syslog"
10
11 case $1 in
12 start)
13 $SSD --start --exec $PROG -- $OPTS 8
14 ;;
15 stop)
16 $SSD --start --exec $PROG -- $OPTS 0
17 ;;
18 restart)
19 $0 stop
20 $0 start
21 ;;
22 status)
23 $SSD --status --name $NAME
24 case $? in
25 0) echo "$PROG is running with pid $(pgrep -o -x nfsd[4]?)" ;;
26 3) echo "$PROG is not running" ;;
27 4) echo "Unable to determine the program status" ;;
28 esac
29 ;;
30 *)
31 echo "usage: $0 [start|stop|restart|status]"
32 ;;
33 esac
34
35 # End of file
|