]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - etc/rc.d/yppasswdd
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.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 rcvar="nis_yppasswdd_enable"
15
16 load_rc_config $name
17
18 command="/usr/sbin/rpc.${name}"
19 command_args="${nis_yppasswdd_flags}"
20
21 start_precmd="yppasswdd_precmd"
22
23 yppasswdd_precmd()
24 {
25         local _domain
26
27         force_depend rpcbind || return 1
28         force_depend ypserv nis_server || 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
37 run_rc_command "$1"