]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/ypupdated
This commit was generated by cvs2svn to compensate for changes in r161561,
[FreeBSD/FreeBSD.git] / etc / rc.d / ypupdated
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # PROVIDE: ypupdated
7 # REQUIRE: rpcbind ypserv
8
9 . /etc/rc.subr
10
11 name="ypupdated"
12 rcvar="rpc_ypupdated_enable"
13 command="/usr/sbin/rpc.${name}"
14 start_precmd="rpc_ypupdated_precmd"
15
16 rpc_ypupdated_precmd()
17 {
18         if ! checkyesno rpcbind_enable  && \
19             ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
20         then
21                 force_depend rpcbind || return 1
22         fi
23         if ! checkyesno nis_server_enable && \
24             ! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1
25         then
26                 force_depend ypserv || return 1
27         fi
28
29         _domain=`domainname`
30         if [ -z "$_domain" ]; then
31                 warn "NIS domainname(1) is not set."
32                 return 1
33         fi
34 }
35
36 load_rc_config $name
37 run_rc_command "$1"