MFC: following 2 commits:
[dragonfly.git] / etc / rc.d / nfslocking
blobaa4425624a12387a753f6b2f1d25ebc8e72d8201
1 #!/bin/sh
3 # $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $
4 # $FreeBSD: src/etc/rc.d/nfslocking,v 1.4 2003/01/20 18:57:16 mtm Exp $
5 # $DragonFly: src/etc/rc.d/nfslocking,v 1.4 2005/11/19 21:47:32 swildner Exp $
8 # PROVIDE: nfslocking
9 # REQUIRE: nfsserver nfsclient nfsd
10 # BEFORE: DAEMON
12 . /etc/rc.subr
14 arg=$1
16 RCVAR_SERVER="nfs_server_enable"
17 RCVAR_CLIENT="nfs_client_enable"
18 RCVAR_STATD="rpc_statd_enable"
19 RCVAR_LOCKD="rpc_lockd_enable"
21 start_precmd='checkyesno ${RCVAR_SERVER} || checkyesno ${RCVAR_CLIENT} ||
22 [ -n "$rc_force" ]'
23 stop_precmd=$start_precmd
24 status_precmd=$start_precmd
26 name="statd"
27 rcvar=${RCVAR_STATD}
28 command="/usr/sbin/rpc.${name}"
29 load_rc_config $name
30 run_rc_command "$arg"
32 name="lockd"
33 rcvar=${RCVAR_LOCKD}
34 command="/usr/sbin/rpc.${name}"
35 load_rc_config $name
36 run_rc_command "$arg"