Nuke unused macro and comment
[dragonfly.git] / etc / rc.d / ypset
blobf480fcc6b66a8798c7a59345b041bea8164ef2c0
1 #!/bin/sh
3 # $FreeBSD: src/etc/rc.d/ypset,v 1.5 2003/07/09 03:21:03 mtm Exp $
4 # $DragonFly: src/etc/rc.d/ypset,v 1.3 2005/11/19 21:47:32 swildner Exp $
7 # PROVIDE: ypset
8 # REQUIRE: ypbind
10 . /etc/rc.subr
12 name="ypset"
13 rcvar="nis_ypset_enable"
14 command="/usr/sbin/${name}"
15 start_precmd="ypset_precmd"
16 load_rc_config $name
17 command_args="${nis_ypset_flags}"
19 ypset_precmd()
21 if ! checkyesno rpcbind_enable && \
22 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
23 then
24 force_depend rpcbind || return 1
26 if ! checkyesno nis_client_enable && \
27 ! /etc/rc.d/ypbind forcestatus 1>/dev/null 2>&1
28 then
29 force_depend ypbind || return 1
32 _domain=`domainname`
33 if [ -z "$_domain" ]; then
34 warn "NIS domainname(1) is not set."
35 return 1
39 run_rc_command "$1"