Deleted Added
full compact
ypserv (136224) ypserv (165664)
1#!/bin/sh
2#
3# $NetBSD: ypserv,v 1.5 2000/09/19 13:04:39 lukem Exp $
1#!/bin/sh
2#
3# $NetBSD: ypserv,v 1.5 2000/09/19 13:04:39 lukem Exp $
4# $FreeBSD: head/etc/rc.d/ypserv 136224 2004-10-07 13:55:26Z mtm $
4# $FreeBSD: head/etc/rc.d/ypserv 165664 2006-12-30 22:53:20Z yar $
5#
6
7# PROVIDE: ypserv
8# REQUIRE: rpcbind
9
10. /etc/rc.subr
11
12name="ypserv"
13rcvar="nis_server_enable"
14command="/usr/sbin/${name}"
15start_precmd="ypserv_prestart"
16
17load_rc_config $name
18command_args="${nis_server_flags}"
19
20ypserv_prestart()
21{
5#
6
7# PROVIDE: ypserv
8# REQUIRE: rpcbind
9
10. /etc/rc.subr
11
12name="ypserv"
13rcvar="nis_server_enable"
14command="/usr/sbin/${name}"
15start_precmd="ypserv_prestart"
16
17load_rc_config $name
18command_args="${nis_server_flags}"
19
20ypserv_prestart()
21{
22 local _domain
23
22 if ! checkyesno rpcbind_enable && \
23 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
24 then
25 force_depend rpcbind || return 1
26 fi
27 _domain=`domainname`
28 if [ -z "$_domain" ]; then
29 warn "NIS domainname(1) is not set."
30 return 1
31 fi
32 if [ ! -d /var/yp/$_domain/. ]; then
33 warn "/var/yp/$_domain is not a directory."
34 return 1
35 fi
36}
37
38run_rc_command "$1"
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 _domain=`domainname`
30 if [ -z "$_domain" ]; then
31 warn "NIS domainname(1) is not set."
32 return 1
33 fi
34 if [ ! -d /var/yp/$_domain/. ]; then
35 warn "/var/yp/$_domain is not a directory."
36 return 1
37 fi
38}
39
40run_rc_command "$1"