xref: /freebsd/libexec/rc/rc.d/ypupdated (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
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