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