1#!/bin/sh 2# 3# $NetBSD: ypbind,v 1.5 2002/03/22 04:34:01 thorpej Exp $ 4# $FreeBSD: src/etc/rc.d/ypbind,v 1.6 2003/07/09 03:21:03 mtm Exp $ 5# 6 7# PROVIDE: ypbind 8# REQUIRE: ypserv 9# BEFORE: DAEMON 10 11. /etc/rc.subr 12 13name="ypbind" 14rcvar="nis_client_enable" 15command="/usr/sbin/${name}" 16start_precmd="ypbind_precmd" 17 18ypbind_precmd() 19{ 20 if ! checkyesno rpcbind_enable && \ 21 ! /etc/rc.d/rpcbind forcestatus >/dev/null 2>&1 22 then 23 force_depend rpcbind || return 1 24 fi 25 26 _domain=`domainname` 27 if [ -z "$_domain" ]; then 28 warn "NIS domainname(1) is not set." 29 return 1 30 fi 31} 32 33load_rc_config $name 34command_args="${nis_client_flags}" 35 36run_rc_command "$1" 37