3 # source application-specific settings
4 [ -f /etc
/conf.d
/nfs
] && .
/etc
/conf.d
/nfs
10 NFSD_PID
=`pidof -o %PPID nfsd`
11 MOUNTD_PID
=`pidof -o %PPID /usr/sbin/rpc.mountd`
14 stat_busy
"Starting $DAEMON_NAME"
16 if [ ! -f /var
/run
/daemons
/portmap
]; then
17 echo "ERROR: portmap is not running"
22 if [ ! -f /var
/run
/daemons
/nfslock
]; then
23 echo "ERROR: nfslock is not running"
27 # Check for /proc/fs/nfsd
28 if grep -qs nfsd
/proc
/filesystems
; then
29 if ! grep -qs "nfsd /proc/fs/nfsd" /proc
/mounts
; then
30 mount
-t nfsd
-o nodev
,noexec
,nosuid nfsd
/proc
/fs
/nfsd
36 [ -z "$MOUNTD_PID" ] && /usr
/sbin
/rpc.mountd
$MOUNTD_OPTS
41 echo `pidof -o %PPID /usr/sbin/rpc.mountd` > /var
/run
/rpc.mountd.pid
44 [ -z "$NFSD_PID" ] && /usr
/sbin
/rpc.nfsd
$NFSD_OPTS
49 echo `pidof -o %PPID nfsd` > /var
/run
/rpc.nfsd.pid
52 /usr
/sbin
/sm-notify
$SMNOTIFY_OPTS
53 add_daemon
$DAEMON_NAME
58 stat_busy
"Stopping $DAEMON_NAME"
59 [ ! -z "$MOUNTD_PID" ] && kill $MOUNTD_PID &> /dev
/null
64 rm /var
/run
/rpc.mountd.pid
&> /dev
/null
67 [ ! -z "$NFSD_PID" ] && kill $NFSD_PID &> /dev
/null
72 kill -9 $NFSD_PID &> /dev
/null
73 rm /var
/run
/rpc.nfsd.pid
&> /dev
/null
75 if [ "$RUNLEVEL" = "0" ]; then
76 /usr
/sbin
/exportfs
-au
78 rm_daemon
$DAEMON_NAME
89 echo "usage: $0 {start|stop|restart}"