xref: /freebsd/libexec/rc/rc.d/ypxfrd (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1#!/bin/sh
2#
3#
4
5# PROVIDE: ypxfrd
6# REQUIRE: rpcbind ypserv
7# KEYWORD: shutdown
8
9. /etc/rc.subr
10
11name="ypxfrd"
12desc="NIS map transfer server"
13rcvar="nis_ypxfrd_enable"
14
15: ${ypxfrd_svcj_options:="net_basic"}
16
17load_rc_config $name
18
19command="/usr/sbin/rpc.${name}"
20command_args="${nis_ypxfrd_flags}"
21
22start_precmd="ypxfrd_precmd"
23
24ypxfrd_precmd()
25{
26	local _domain
27
28	force_depend rpcbind || return 1
29	force_depend ypserv nis_server || return 1
30
31	_domain=`domainname`
32	if [ -z "$_domain" ]; then
33		warn "NIS domainname(1) is not set."
34		return 1
35	fi
36}
37
38run_rc_command "$1"
39