Deleted Added
full compact
yppasswdd (124616) yppasswdd (124622)
1#!/bin/sh
2#
3# $NetBSD: yppasswdd,v 1.6 2002/03/22 04:34:01 thorpej Exp $
1#!/bin/sh
2#
3# $NetBSD: yppasswdd,v 1.6 2002/03/22 04:34:01 thorpej Exp $
4# $FreeBSD: head/etc/rc.d/yppasswdd 124616 2004-01-17 10:16:38Z mtm $
4# $FreeBSD: head/etc/rc.d/yppasswdd 124622 2004-01-17 10:59:43Z mtm $
5#
6
7# PROVIDE: yppasswdd
8# REQUIRE: ypserv ypbind
9# BEFORE: LOGIN
10# KEYWORD: FreeBSD
11
12. /etc/rc.subr
13
14name="yppasswdd"
15command="/usr/sbin/rpc.${name}"
16start_precmd="yppasswdd_precmd"
17
18load_rc_config $name
5#
6
7# PROVIDE: yppasswdd
8# REQUIRE: ypserv ypbind
9# BEFORE: LOGIN
10# KEYWORD: FreeBSD
11
12. /etc/rc.subr
13
14name="yppasswdd"
15command="/usr/sbin/rpc.${name}"
16start_precmd="yppasswdd_precmd"
17
18load_rc_config $name
19case ${OSTYPE} in
20FreeBSD)
21 rcvar="nis_yppasswdd_enable"
22 command_args="${nis_yppasswdd_flags}"
23 ;;
24NetBSD)
25 rcvar=$name
26 required_vars="rpcbind ypserv"
27 ;;
28esac
19rcvar="nis_yppasswdd_enable"
20command_args="${nis_yppasswdd_flags}"
29
30yppasswdd_precmd()
31{
21
22yppasswdd_precmd()
23{
32 case ${OSTYPE} in
33 FreeBSD)
34 if ! checkyesno rpcbind_enable && \
35 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
36 then
37 force_depend rpcbind || return 1
38 fi
39 if ! checkyesno nis_server_enable && \
40 ! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1
41 then
42 force_depend ypserv || return 1
43 fi
44 ;;
45 esac
46
24 if ! checkyesno rpcbind_enable && \
25 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
26 then
27 force_depend rpcbind || return 1
28 fi
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
33 fi
47 _domain=`domainname`
48 if [ -z "$_domain" ]; then
49 warn "NIS domainname(1) is not set."
50 return 1
51 fi
52}
53
54run_rc_command "$1"
34 _domain=`domainname`
35 if [ -z "$_domain" ]; then
36 warn "NIS domainname(1) is not set."
37 return 1
38 fi
39}
40
41run_rc_command "$1"