1#!/bin/sh 2# 3# $FreeBSD: src/etc/rc.d/ypupdated,v 1.4 2003/07/09 03:21:03 mtm Exp $ 4# 5 6# PROVIDE: ypupdated 7# REQUIRE: rpcbind ypserv 8 9. /etc/rc.subr 10 11name="ypupdated" 12rcvar="rpc_ypupdated_enable" 13command="/usr/sbin/rpc.${name}" 14start_precmd="rpc_ypupdated_precmd" 15 16rpc_ypupdated_precmd() 17{ 18 if ! checkyesno rpcbind_enable && \ 19 ! /etc/rc.d/rpcbind forcestatus >/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 >/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 36load_rc_config $name 37run_rc_command "$1" 38