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