]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/ypset
Document SA-19:09, SA-19:11.
[FreeBSD/FreeBSD.git] / etc / rc.d / ypset
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # PROVIDE: ypset
7 # REQUIRE: ypbind
8 # KEYWORD: shutdown
9
10 . /etc/rc.subr
11
12 name="ypset"
13 desc="tell ypbind(8) which YP server process to use"
14 rcvar="nis_ypset_enable"
15
16 load_rc_config $name
17
18 command="/usr/sbin/${name}"
19 command_args="${nis_ypset_flags}"
20
21 start_precmd="ypset_precmd"
22
23 ypset_precmd()
24 {
25         local _domain
26
27         force_depend rpcbind || return 1
28         force_depend ypbind nis_client || 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"