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
|
|
|
|
# KEYWORD: FreeBSD NetBSD
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="yppasswdd"
|
2002-06-13 22:14:37 +00:00
|
|
|
command="/usr/sbin/rpc.{name}"
|
2001-06-16 07:16:14 +00:00
|
|
|
start_precmd="yppasswdd_precmd"
|
|
|
|
|
2002-09-06 16:18:05 +00:00
|
|
|
case ${OSTYPE} in
|
2002-06-13 22:14:37 +00:00
|
|
|
FreeBSD)
|
|
|
|
rcvar="nis_yppasswdd_enable"
|
|
|
|
command_args="${nis_yppasswdd_flags}"
|
|
|
|
;;
|
|
|
|
NetBSD)
|
|
|
|
rcvar=$name
|
|
|
|
required_vars="rpcbind ypserv"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2001-06-16 07:16:14 +00:00
|
|
|
yppasswdd_precmd()
|
|
|
|
{
|
2002-09-06 16:18:05 +00:00
|
|
|
case ${OSTYPE} in
|
2002-08-14 05:44:32 +00:00
|
|
|
FreeBSD)
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2001-06-16 07:16:14 +00:00
|
|
|
_domain=`domainname`
|
|
|
|
if [ -z "$_domain" ]; then
|
|
|
|
warn "domainname(1) is not set."
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|