ypset revision 231792
1101704Smjacob#!/bin/sh 2139749Simp# 3233425Smarius# $FreeBSD: stable/9/etc/rc.d/ypset 231792 2012-02-15 22:59:15Z dougb $ 4147883Sscottl# 5147883Sscottl 6102599Smjacob# PROVIDE: ypset 7147883Sscottl# REQUIRE: ypbind 8147883Sscottl# KEYWORD: shutdown 9102599Smjacob 10147883Sscottl. /etc/rc.subr 11147883Sscottl 12147883Sscottlname="ypset" 13147883Sscottlrcvar="nis_ypset_enable" 14147883Sscottl 15147883Sscottlload_rc_config $name 16147883Sscottl 17147883Sscottlcommand="/usr/sbin/${name}" 18147883Sscottlcommand_args="${nis_ypset_flags}" 19147883Sscottl 20147883Sscottlstart_precmd="ypset_precmd" 21147883Sscottl 22102599Smjacobypset_precmd() 23147883Sscottl{ 24147883Sscottl local _domain 25147883Sscottl 26147883Sscottl force_depend rpcbind || return 1 27147883Sscottl force_depend ypbind nis_client || return 1 28147883Sscottl 29147883Sscottl _domain=`domainname` 30147883Sscottl if [ -z "$_domain" ]; then 31154603Smjacob warn "NIS domainname(1) is not set." 32154603Smjacob return 1 33154603Smjacob fi 34101704Smjacob} 35101704Smjacob 36101704Smjacobrun_rc_command "$1" 37154603Smjacob