kcollect - Adjust Mops right hand on graph
[dragonfly.git] / etc / rc.d / statd
blob71c3c4f358c13e499d750b3b00221d599dcad28f
1 #!/bin/sh
3 # FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm Exp
4 # $FreeBSD: src/etc/rc.d/statd,v 1.21 2008/07/16 19:50:29 dougb Exp $
7 # PROVIDE: statd
8 # REQUIRE: nfsserver nfsclient nfsd rpcbind
9 # BEFORE: DAEMON
10 # KEYWORD: nojail shutdown
12 . /etc/rc.subr
14 name="statd"
15 rcvar=rpc_statd_enable
16 command="/usr/sbin/rpc.${name}"
17 start_precmd='statd_precmd'
18 stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable'
19 status_precmd=$stop_precmd
21 # Make sure that we are either an NFS client or server, and that we get
22 # the correct flags from rc.conf(5).
24 statd_precmd()
26 local ret
27 ret=0
29 if ! checkyesno nfs_server_enable && ! checkyesno nfs_client_enable
30 then
31 ret=1
33 if ! checkyesno rpcbind_enable && \
34 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
35 then
36 force_depend rpcbind || ret=1
38 rc_flags=${rpc_statd_flags}
39 return ${ret}
42 load_rc_config $name
43 run_rc_command $1