xref: /freebsd/libexec/rc/rc.d/ypset (revision 2e3507c25e42292b45a5482e116d278f5515d04d)
1#!/bin/sh
2#
3#
4
5# PROVIDE: ypset
6# REQUIRE: ypbind
7# KEYWORD: shutdown
8
9. /etc/rc.subr
10
11name="ypset"
12desc="tell ypbind(8) which YP server process to use"
13rcvar="nis_ypset_enable"
14
15load_rc_config $name
16
17command="/usr/sbin/${name}"
18command_args="${nis_ypset_flags}"
19
20start_precmd="ypset_precmd"
21
22ypset_precmd()
23{
24	local _domain
25
26	force_depend rpcbind || return 1
27	force_depend ypbind nis_client || return 1
28
29	_domain=`domainname`
30	if [ -z "$_domain" ]; then
31		warn "NIS domainname(1) is not set."
32		return 1
33	fi
34}
35
36run_rc_command "$1"
37