xref: /freebsd/libexec/rc/rc.d/yppasswdd (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1#!/bin/sh
2#
3#
4
5# PROVIDE: yppasswdd
6# REQUIRE: ypserv ypset
7# BEFORE:  LOGIN
8# KEYWORD: shutdown
9
10. /etc/rc.subr
11
12name="yppasswdd"
13desc="Server for updating NIS passwords"
14rcvar="nis_yppasswdd_enable"
15
16: ${yppasswdd_svcj_options:="net_basic"}
17
18load_rc_config $name
19
20command="/usr/sbin/rpc.${name}"
21command_args="${nis_yppasswdd_flags}"
22
23start_precmd="yppasswdd_precmd"
24
25yppasswdd_precmd()
26{
27	local _domain
28
29	force_depend rpcbind || return 1
30	force_depend ypserv nis_server || return 1
31
32	_domain=`domainname`
33	if [ -z "$_domain" ]; then
34		warn "NIS domainname(1) is not set."
35		return 1
36	fi
37}
38
39run_rc_command "$1"
40