1#!/bin/sh 2# 3# 4 5# PROVIDE: ypset 6# REQUIRE: ypbind 7# KEYWORD: shutdown 8 9. /etc/rc.subr 10 11name="ypset" 12desc="tell ypbind(8) which YP server process to use" 13rcvar="nis_ypset_enable" 14 15load_rc_config $name 16 17# doesn't make sense to run in a svcj: config setting 18ypset_svcj="NO" 19 20command="/usr/sbin/${name}" 21command_args="${nis_ypset_flags}" 22 23start_precmd="ypset_precmd" 24 25ypset_precmd() 26{ 27 local _domain 28 29 force_depend rpcbind || return 1 30 force_depend ypbind nis_client || return 1 31 32 _domain=`domainname` 33 if [ -z "$_domain" ]; then 34 warn "NIS domainname(1) is not set." 35 return 1 36 fi 37} 38 39run_rc_command "$1" 40