Merge branch 'vendor/OPENSSL'
[dragonfly.git] / etc / rc.d / ypbind
1 #!/bin/sh
2 #
3 # $NetBSD: ypbind,v 1.5 2002/03/22 04:34:01 thorpej Exp $
4 # $FreeBSD: src/etc/rc.d/ypbind,v 1.6 2003/07/09 03:21:03 mtm Exp $
5 # $DragonFly: src/etc/rc.d/ypbind,v 1.4 2005/11/19 21:47:32 swildner Exp $
6 #
7
8 # PROVIDE: ypbind
9 # REQUIRE: ypserv
10 # BEFORE:  DAEMON
11
12 . /etc/rc.subr
13
14 name="ypbind"
15 command="/usr/sbin/${name}"
16 start_precmd="ypbind_precmd"
17
18 load_rc_config $name
19 rcvar="nis_client_enable"
20 command_args="${nis_client_flags}"
21 ypbind_precmd()
22 {
23         if ! checkyesno rpcbind_enable  && \
24         ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
25         then
26                 force_depend rpcbind || return 1
27         fi
28         _domain=`domainname`
29         if [ -z "$_domain" ]; then
30                 warn "NIS domainname(1) is not set."
31                 return 1
32         fi
33 }
34
35 run_rc_command "$1"