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