2001-06-16 07:16:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-06-13 22:14:37 +00:00
|
|
|
# $FreeBSD$
|
2001-06-16 07:16:14 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: ypbind
|
|
|
|
# REQUIRE: ypserv
|
2002-06-13 22:14:37 +00:00
|
|
|
# BEFORE: DAEMON
|
2008-07-16 19:50:29 +00:00
|
|
|
# KEYWORD: shutdown
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="ypbind"
|
|
|
|
command="/usr/sbin/${name}"
|
|
|
|
start_precmd="ypbind_precmd"
|
|
|
|
|
2003-01-24 00:37:52 +00:00
|
|
|
load_rc_config $name
|
2004-01-17 10:59:43 +00:00
|
|
|
rcvar="nis_client_enable"
|
|
|
|
command_args="${nis_client_flags}"
|
2002-06-13 22:14:37 +00:00
|
|
|
|
2001-06-16 07:16:14 +00:00
|
|
|
ypbind_precmd()
|
|
|
|
{
|
2006-12-30 22:53:20 +00:00
|
|
|
local _domain
|
|
|
|
|
2004-01-17 10:59:43 +00:00
|
|
|
if ! checkyesno rpcbind_enable && \
|
|
|
|
! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
|
|
|
|
then
|
|
|
|
force_depend rpcbind || return 1
|
|
|
|
fi
|
2002-11-04 20:51:20 +00:00
|
|
|
|
2001-06-16 07:16:14 +00:00
|
|
|
_domain=`domainname`
|
|
|
|
if [ -z "$_domain" ]; then
|
2003-07-09 03:21:03 +00:00
|
|
|
warn "NIS domainname(1) is not set."
|
2001-06-16 07:16:14 +00:00
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
run_rc_command "$1"
|