Deleted Added
full compact
yppasswdd (193197) yppasswdd (231667)
1#!/bin/sh
2#
1#!/bin/sh
2#
3# $FreeBSD: head/etc/rc.d/yppasswdd 193197 2009-06-01 04:55:13Z dougb $
3# $FreeBSD: head/etc/rc.d/yppasswdd 231667 2012-02-14 10:51:24Z dougb $
4#
5
6# PROVIDE: yppasswdd
7# REQUIRE: ypserv ypset
8# BEFORE: LOGIN
9# KEYWORD: shutdown
10
11. /etc/rc.subr
12
13name="yppasswdd"
4#
5
6# PROVIDE: yppasswdd
7# REQUIRE: ypserv ypset
8# BEFORE: LOGIN
9# KEYWORD: shutdown
10
11. /etc/rc.subr
12
13name="yppasswdd"
14command="/usr/sbin/rpc.${name}"
15start_precmd="yppasswdd_precmd"
14rcvar="nis_yppasswdd_enable"
16
17load_rc_config $name
15
16load_rc_config $name
18rcvar="nis_yppasswdd_enable"
17
18command="/usr/sbin/rpc.${name}"
19command_args="${nis_yppasswdd_flags}"
20
19command_args="${nis_yppasswdd_flags}"
20
21start_precmd="yppasswdd_precmd"
22
21yppasswdd_precmd()
22{
23 local _domain
24
23yppasswdd_precmd()
24{
25 local _domain
26
25 if ! checkyesno rpcbind_enable && \
26 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
27 then
28 force_depend rpcbind || return 1
29 fi
30 if ! checkyesno nis_server_enable && \
31 ! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1
32 then
33 force_depend ypserv || return 1
34 fi
27 force_depend rpcbind || return 1
28 force_depend ypserv nis_server || return 1
29
35 _domain=`domainname`
36 if [ -z "$_domain" ]; then
37 warn "NIS domainname(1) is not set."
38 return 1
39 fi
40}
41
42run_rc_command "$1"
30 _domain=`domainname`
31 if [ -z "$_domain" ]; then
32 warn "NIS domainname(1) is not set."
33 return 1
34 fi
35}
36
37run_rc_command "$1"