libefivar: Fix wrong MLINKS.
[dragonfly.git] / etc / rc.d / ypserv
blob1b0add13413cdf89878d71f7f03a594852d0c8d1
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 21: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"