xref: /freebsd/libexec/rc/rc.d/ypbind (revision 61b07f8aa52844b21637ac264ea134c1aef48cb7)
1#!/bin/sh
2#
3#
4
5# PROVIDE: ypbind
6# REQUIRE: ypserv
7# BEFORE:  DAEMON
8# KEYWORD: shutdown
9
10. /etc/rc.subr
11
12name="ypbind"
13desc="NIS domain binding daemon"
14rcvar="nis_client_enable"
15
16: ${ypbind_svcj_options:="net_basic"}
17
18load_rc_config $name
19
20command="/usr/sbin/${name}"
21command_args="${nis_client_flags}"
22
23start_precmd="ypbind_precmd"
24
25ypbind_precmd()
26{
27	local _domain
28
29	force_depend rpcbind || return 1
30
31	_domain=`domainname`
32	if [ -z "$_domain" ]; then
33		warn "NIS domainname(1) is not set."
34		return 1
35	fi
36}
37
38run_rc_command "$1"
39