Deleted Added
full compact
statd (136224) statd (168085)
1#!/bin/sh
2#
3# $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $
1#!/bin/sh
2#
3# $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $
4# $FreeBSD: head/etc/rc.d/statd 136224 2004-10-07 13:55:26Z mtm $
4# $FreeBSD: head/etc/rc.d/statd 168085 2007-03-30 19:08:58Z mtm $
5#
6
7# PROVIDE: nfslocking
5#
6
7# PROVIDE: nfslocking
8# REQUIRE: nfsserver nfsclient nfsd
8# REQUIRE: nfsserver nfsclient nfsd rpcbind
9# BEFORE: DAEMON
10# KEYWORD: nojail
11
12. /etc/rc.subr
13
14# Save the (one) commandline argument in case it gets clobbered.
15arg=$1
16
17# Either NFS client or server must be enabled or this must be a 'forcestart'
18# for either of the daemons to start.
19#
9# BEFORE: DAEMON
10# KEYWORD: nojail
11
12. /etc/rc.subr
13
14# Save the (one) commandline argument in case it gets clobbered.
15arg=$1
16
17# Either NFS client or server must be enabled or this must be a 'forcestart'
18# for either of the daemons to start.
19#
20start_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable ||
20nfslocking_precmd()
21{
22 if ! checkyesno nfs_server_enable && ! checkyesno nfs_client_enable && \
23 [ -z "$rc_force" ]
24 then
25 return 1
26 fi
27 if ! checkyesno rpcbind_enable && \
28 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
29 then
30 force_depend rpcbind || return 1
31 fi
32}
33
34start_precmd="nfslocking_precmd"
35stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable ||
21 [ -n "$rc_force" ]'
36 [ -n "$rc_force" ]'
22stop_precmd=$start_precmd
23status_precmd=$start_precmd
37status_precmd=$stop_precmd
24
25# rpc.statd
26#
27name="statd"
28rcvar=rpc_statd_enable
29command="/usr/sbin/rpc.${name}"
30load_rc_config $name
31run_rc_command "$arg"
32
33# rpc.lockd
34#
35name="lockd"
36rcvar=rpc_lockd_enable
37command="/usr/sbin/rpc.${name}"
38load_rc_config $name
39run_rc_command "$arg"
38
39# rpc.statd
40#
41name="statd"
42rcvar=rpc_statd_enable
43command="/usr/sbin/rpc.${name}"
44load_rc_config $name
45run_rc_command "$arg"
46
47# rpc.lockd
48#
49name="lockd"
50rcvar=rpc_lockd_enable
51command="/usr/sbin/rpc.${name}"
52load_rc_config $name
53run_rc_command "$arg"