]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - etc/rc.d/ypbind
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / etc / rc.d / ypbind
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
13 name="ypbind"
14 command="/usr/sbin/${name}"
15 start_precmd="ypbind_precmd"
16
17 load_rc_config $name
18 rcvar="nis_client_enable"
19 command_args="${nis_client_flags}"
20
21 ypbind_precmd()
22 {
23         local _domain
24
25         if ! checkyesno rpcbind_enable  && \
26             ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
27         then
28                 force_depend rpcbind || return 1
29         fi
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"