Deleted Added
full compact
statd (223852) statd (231667)
1#!/bin/sh
2#
3# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm Exp
1#!/bin/sh
2#
3# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm Exp
4# $FreeBSD: head/etc/rc.d/statd 223852 2011-07-08 00:49:50Z rmacklem $
4# $FreeBSD: head/etc/rc.d/statd 231667 2012-02-14 10:51:24Z dougb $
5#
6
7# PROVIDE: statd
8# REQUIRE: nfsclient nfsd rpcbind
9# BEFORE: DAEMON
10# KEYWORD: nojail shutdown
11
12. /etc/rc.subr
13
14name="statd"
15rcvar=rpc_statd_enable
16command="/usr/sbin/rpc.${name}"
17start_precmd='statd_precmd'
5#
6
7# PROVIDE: statd
8# REQUIRE: nfsclient nfsd rpcbind
9# BEFORE: DAEMON
10# KEYWORD: nojail shutdown
11
12. /etc/rc.subr
13
14name="statd"
15rcvar=rpc_statd_enable
16command="/usr/sbin/rpc.${name}"
17start_precmd='statd_precmd'
18stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable'
19status_precmd=$stop_precmd
20
21# Make sure that we are either an NFS client or server, and that we get
22# the correct flags from rc.conf(5).
23#
24statd_precmd()
25{
18
19# Make sure that we are either an NFS client or server, and that we get
20# the correct flags from rc.conf(5).
21#
22statd_precmd()
23{
26 local ret
27 ret=0
28
29 if ! checkyesno nfs_server_enable && ! checkyesno nfs_client_enable
30 then
31 ret=1
32 fi
33 if ! checkyesno rpcbind_enable && \
34 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
35 then
36 force_depend rpcbind || ret=1
37 fi
24 force_depend rpcbind || return 1
25
38 rc_flags=${rpc_statd_flags}
26 rc_flags=${rpc_statd_flags}
39 return ${ret}
40}
41
42load_rc_config $name
43run_rc_command $1
27}
28
29load_rc_config $name
30run_rc_command $1