1ecb0d140f
variables that may be set in /etc/rc.conf.d/CMD instead of /etc/rc.conf. Fixes PR 20768 from Pavel Cahyna.
34 lines
548 B
Bash
Executable File
34 lines
548 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: ypserv,v 1.8 2004/10/12 14:51:03 lukem Exp $
|
|
#
|
|
|
|
# PROVIDE: ypserv
|
|
# REQUIRE: rpcbind
|
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
|
|
|
name="ypserv"
|
|
rcvar=$name
|
|
command="/usr/sbin/${name}"
|
|
required_vars="rpcbind"
|
|
start_precmd="ypserv_precmd"
|
|
|
|
ypserv_precmd()
|
|
{
|
|
_domain=$(domainname)
|
|
if [ -z "$_domain" ]; then
|
|
warn "domainname(1) is not set."
|
|
return 1
|
|
fi
|
|
|
|
if [ ! -d /var/yp/$_domain/. ]; then
|
|
warn "/var/yp/$_domain is not a directory."
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
load_rc_config $name
|
|
load_rc_config_var rpcbind rpcbind
|
|
run_rc_command "$1"
|