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