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