NetBSD/etc/rc.d/nfslocking
lukem 1ecb0d140f Use 'load_rc_config_var CMD VAR' to set VAR for "foreign" rc.conf(5)
variables that may be set in /etc/rc.conf.d/CMD instead of /etc/rc.conf.
Fixes PR 20768 from Pavel Cahyna.
2004-10-12 14:51:03 +00:00

38 lines
713 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: nfslocking,v 1.8 2004/10/12 14:51:03 lukem Exp $
#
# PROVIDE: nfslocking
# REQUIRE: nfsd
# BEFORE: DAEMON
$_rc_subr_loaded . /etc/rc.subr
arg=$1
nfslocking_precmd()
{
checkyesno nfs_server || checkyesno nfs_client || [ -n "$rc_force" ]
}
name="statd"
rcvar=$name
command="/usr/sbin/rpc.${name}"
start_precmd='nfslocking_precmd'
stop_precmd=$start_precmd
status_precmd=$start_precmd
load_rc_config $name
load_rc_config_var nfsd nfs_server
run_rc_command "$arg"
name="lockd"
rcvar=$name
command="/usr/sbin/rpc.${name}"
start_precmd='nfslocking_precmd'
stop_precmd=$start_precmd
status_precmd=$start_precmd
load_rc_config $name
load_rc_config_var nfsd nfs_server
run_rc_command "$arg"