1#!/bin/sh 2# 3# 4 5# PROVIDE: ypupdated 6# REQUIRE: rpcbind ypserv 7# KEYWORD: shutdown 8 9. /etc/rc.subr 10 11name="ypupdated" 12rcvar="rpc_ypupdated_enable" 13 14load_rc_config $name 15 16command="/usr/sbin/rpc.${name}" 17start_precmd="rpc_ypupdated_precmd" 18 19rpc_ypupdated_precmd() 20{ 21 local _domain 22 23 force_depend rpcbind || return 1 24 force_depend ypserv nis_server || return 1 25 26 _domain=`domainname` 27 if [ -z "$_domain" ]; then 28 warn "NIS domainname(1) is not set." 29 return 1 30 fi 31} 32 33run_rc_command "$1" 34