2001-06-16 07:16:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-06-13 22:14:37 +00:00
|
|
|
# $NetBSD: yppasswdd,v 1.6 2002/03/22 04:34:01 thorpej Exp $
|
|
|
|
# $FreeBSD$
|
2001-06-16 07:16:14 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: yppasswdd
|
|
|
|
# REQUIRE: ypserv ypbind
|
2002-06-13 22:14:37 +00:00
|
|
|
# BEFORE: LOGIN
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="yppasswdd"
|
2003-01-23 04:31:55 +00:00
|
|
|
command="/usr/sbin/rpc.${name}"
|
2001-06-16 07:16:14 +00:00
|
|
|
start_precmd="yppasswdd_precmd"
|
|
|
|
|
2003-01-24 00:37:52 +00:00
|
|
|
load_rc_config $name
|
2004-01-17 10:59:43 +00:00
|
|
|
rcvar="nis_yppasswdd_enable"
|
|
|
|
command_args="${nis_yppasswdd_flags}"
|
2002-06-13 22:14:37 +00:00
|
|
|
|
2001-06-16 07:16:14 +00:00
|
|
|
yppasswdd_precmd()
|
|
|
|
{
|
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
|
|
|
|
if ! checkyesno nis_server_enable && \
|
|
|
|
! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1
|
|
|
|
then
|
|
|
|
force_depend ypserv || return 1
|
|
|
|
fi
|
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"
|