LWKT message ports contain a number of function pointers which abstract
[dragonfly/vkernel-mp.git] / etc / rc.d / ypupdated
bloba01995a7e4a8b8ef44571c419ff70cff82a675ed
1 #!/bin/sh
3 # $FreeBSD: src/etc/rc.d/ypupdated,v 1.4 2003/07/09 03:21:03 mtm Exp $
4 # $DragonFly: src/etc/rc.d/ypupdated,v 1.3 2005/11/19 22:47:32 swildner Exp $
7 # PROVIDE: ypupdated
8 # REQUIRE: rpcbind ypserv
10 . /etc/rc.subr
12 name="ypupdated"
13 rcvar="rpc_ypupdated_enable"
14 command="/usr/sbin/rpc.${name}"
15 start_precmd="rpc_ypupdated_precmd"
17 rpc_ypupdated_precmd()
19 if ! checkyesno rpcbind_enable && \
20 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
21 then
22 force_depend rpcbind || return 1
24 if ! checkyesno nis_server_enable && \
25 ! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1
26 then
27 force_depend ypserv || return 1
30 _domain=`domainname`
31 if [ -z "$_domain" ]; then
32 warn "NIS domainname(1) is not set."
33 return 1
37 load_rc_config $name
38 run_rc_command "$1"