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