MFC if_aue.c rev1.39:
[dragonfly.git] / etc / rc.d / yppasswdd
blob622653030b765b383616ee08ec1893acf940008f
1 #!/bin/sh
3 # $NetBSD: yppasswdd,v 1.6 2002/03/22 04:34:01 thorpej Exp $
4 # $FreeBSD: src/etc/rc.d/yppasswdd,v 1.7 2003/07/09 03:21:03 mtm Exp $
5 # $DragonFly: src/etc/rc.d/yppasswdd,v 1.4 2005/11/19 21:47:32 swildner Exp $
8 # PROVIDE: yppasswdd
9 # REQUIRE: ypserv ypbind
10 # BEFORE: LOGIN
12 . /etc/rc.subr
14 name="yppasswdd"
15 command="/usr/sbin/rpc.${name}"
16 start_precmd="yppasswdd_precmd"
18 load_rc_config $name
19 rcvar="nis_yppasswdd_enable"
20 command_args="${nis_yppasswdd_flags}"
22 yppasswdd_precmd()
24 if ! checkyesno rpcbind_enable && \
25 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
26 then
27 force_depend rpcbind || return 1
29 if ! checkyesno nis_server_enable && \
30 ! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1
31 then
32 force_depend ypserv || return 1
34 _domain=`domainname`
35 if [ -z "$_domain" ]; then
36 warn "NIS domainname(1) is not set."
37 return 1
41 run_rc_command "$1"