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# $DragonFly: src/etc/rc.d/ypbind,v 1.3 2004/01/27 00:55:43 rob Exp $ 6# 7 8# PROVIDE: ypbind 9# REQUIRE: ypserv 10# BEFORE: DAEMON 11# KEYWORD: DragonFly 12 13. /etc/rc.subr 14 15name="ypbind" 16command="/usr/sbin/${name}" 17start_precmd="ypbind_precmd" 18 19load_rc_config $name 20rcvar="nis_client_enable" 21command_args="${nis_client_flags}" 22ypbind_precmd() 23{ 24 if ! checkyesno rpcbind_enable && \ 25 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 26 then 27 force_depend rpcbind || return 1 28 fi 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