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"
|
2012-02-14 10:51:24 +00:00
|
|
|
rcvar="nis_client_enable"
|
2001-06-16 07:16:14 +00:00
|
|
|
|
2003-01-24 00:37:52 +00:00
|
|
|
load_rc_config $name
|
2012-02-14 10:51:24 +00:00
|
|
|
|
|
|
|
command="/usr/sbin/${name}"
|
2004-01-17 10:59:43 +00:00
|
|
|
command_args="${nis_client_flags}"
|
2002-06-13 22:14:37 +00:00
|
|
|
|
2012-02-14 10:51:24 +00:00
|
|
|
start_precmd="ypbind_precmd"
|
|
|
|
|
2001-06-16 07:16:14 +00:00
|
|
|
ypbind_precmd()
|
|
|
|
{
|
2006-12-30 22:53:20 +00:00
|
|
|
local _domain
|
|
|
|
|
2012-02-14 10:51:24 +00:00
|
|
|
force_depend rpcbind || return 1
|
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"
|