1#!/bin/sh 2#
| 1#!/bin/sh 2#
|
3# $NetBSD: ypbind,v 1.3 2000/05/13 08:45:10 lukem Exp $
| 3# $NetBSD: ypbind,v 1.5 2002/03/22 04:34:01 thorpej Exp $ 4# $FreeBSD: head/etc/rc.d/ypbind 98184 2002-06-13 22:14:37Z gordon $
|
4# 5 6# PROVIDE: ypbind 7# REQUIRE: ypserv
| 5# 6 7# PROVIDE: ypbind 8# REQUIRE: ypserv
|
| 9# BEFORE: DAEMON 10# KEYWORD: FreeBSD NetBSD
|
8 9. /etc/rc.subr 10 11name="ypbind"
| 11 12. /etc/rc.subr 13 14name="ypbind"
|
12rcvar=$name
| |
13command="/usr/sbin/${name}" 14start_precmd="ypbind_precmd" 15
| 15command="/usr/sbin/${name}" 16start_precmd="ypbind_precmd" 17
|
| 18case `${CMD_OSTYPE}` in 19FreeBSD) 20 rcvar="nis_client_enable" 21 command_args="${nis_client_flags}" 22 ;; 23NetBSD) 24 rcvar=$name 25 ;; 26esac 27
|
16ypbind_precmd() 17{ 18 _domain=`domainname` 19 if [ -z "$_domain" ]; then 20 warn "domainname(1) is not set." 21 return 1 22 fi 23} 24 25load_rc_config $name 26run_rc_command "$1"
| 28ypbind_precmd() 29{ 30 _domain=`domainname` 31 if [ -z "$_domain" ]; then 32 warn "domainname(1) is not set." 33 return 1 34 fi 35} 36 37load_rc_config $name 38run_rc_command "$1"
|