ypset revision 101851
11573Srgrimes#!/bin/sh 21573Srgrimes# 31573Srgrimes# $FreeBSD: head/etc/rc.d/ypset 101851 2002-08-14 05:44:32Z gordon $ 41573Srgrimes# 51573Srgrimes 61573Srgrimes# PROVIDE: ypset 71573Srgrimes# REQUIRE: ypbind 81573Srgrimes# KEYWORD: FreeBSD 91573Srgrimes 101573Srgrimes. /etc/rc.subr 111573Srgrimes 121573Srgrimesname="ypset" 131573Srgrimesrcvar="nis_ypset_enable" 141573Srgrimescommand="/usr/sbin/${name}" 151573Srgrimescommand_args="${nis_ypset_flags}" 161573Srgrimesstart_precmd="ypset_precmd" 171573Srgrimes 181573Srgrimesypset_precmd() 191573Srgrimes{ 201573Srgrimes if ! checkyesno rpcbind_enable && \ 211573Srgrimes ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 221573Srgrimes then 231573Srgrimes force_depend rpcbind || return 1 241573Srgrimes fi 251573Srgrimes if ! checkyesno nis_client_enable && \ 261573Srgrimes ! /etc/rc.d/ypbind forcestatus 1>/dev/null 2>&1 271573Srgrimes then 281573Srgrimes force_depend ypbind || return 1 291573Srgrimes fi 301573Srgrimes 311573Srgrimes _domain=`domainname` 321573Srgrimes if [ -z "$_domain" ]; then 331573Srgrimes warn "domainname(1) is not set." 341573Srgrimes return 1 351573Srgrimes fi 3690045Sobrien} 3790045Sobrien 381573Srgrimesload_rc_config $name 391573Srgrimesrun_rc_command "$1" 401573Srgrimes