]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/yppasswdd
Merge branch 'releng/11.3' into releng-CDN/11.3
[FreeBSD/FreeBSD.git] / etc / rc.d / yppasswdd
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
13 name="yppasswdd"
14 desc="Server for updating NIS passwords"
15 rcvar="nis_yppasswdd_enable"
16
17 load_rc_config $name
18
19 command="/usr/sbin/rpc.${name}"
20 command_args="${nis_yppasswdd_flags}"
21
22 start_precmd="yppasswdd_precmd"
23
24 yppasswdd_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
38 run_rc_command "$1"