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