xref: /freebsd/libexec/rc/rc.d/ypupdated (revision 95eb4b873b6a8b527c5bd78d7191975dfca38998)
1#!/bin/sh
2#
3#
4
5# PROVIDE: ypupdated
6# REQUIRE: rpcbind ypserv
7# KEYWORD: shutdown
8
9. /etc/rc.subr
10
11name="ypupdated"
12rcvar="rpc_ypupdated_enable"
13
14: ${ypupdated_svcj_options:="net_basic"}
15
16load_rc_config $name
17
18command="/usr/sbin/rpc.${name}"
19start_precmd="rpc_ypupdated_precmd"
20
21rpc_ypupdated_precmd()
22{
23	local _domain
24
25	force_depend rpcbind || return 1
26	force_depend ypserv nis_server || return 1
27
28	_domain=`domainname`
29	if [ -z "$_domain" ]; then
30		warn "NIS domainname(1) is not set."
31		return 1
32	fi
33}
34
35run_rc_command "$1"
36