LWKT message ports contain a number of function pointers which abstract
[dragonfly/vkernel-mp.git] / etc / rc.d / ypserv
blobf65ad23e268e0d92e065a8934b7dd3c90a4f6011
1 #!/bin/sh
3 # $NetBSD: ypserv,v 1.5 2000/09/19 13:04:39 lukem Exp $
4 # $FreeBSD: src/etc/rc.d/ypserv,v 1.7 2003/07/09 03:21:03 mtm Exp $
5 # $DragonFly: src/etc/rc.d/ypserv,v 1.5 2005/11/19 22:47:32 swildner Exp $
8 # PROVIDE: ypserv
9 # REQUIRE: rpcbind
11 . /etc/rc.subr
13 name="ypserv"
14 command="/usr/sbin/${name}"
15 start_precmd="ypserv_precmd"
17 load_rc_config $name
18 rcvar="nis_server_enable"
19 command_args="${nis_server_flags}"
21 ypserv_precmd()
23 if ! checkyesno rpcbind_enable && \
24 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
25 then
26 force_depend rpcbind || return 1
28 _domain=`domainname`
29 if [ -z "$_domain" ]; then
30 warn "NIS domainname(1) is not set."
31 return 1
34 if [ ! -d /var/yp/$_domain/. ]; then
35 warn "/var/yp/$_domain is not a directory."
36 return 1
40 run_rc_command "$1"