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