1#!/bin/sh 2#
| 1#!/bin/sh 2#
|
3# $FreeBSD: head/etc/rc.d/ypxfrd 180564 2008-07-16 19:50:29Z dougb $
| 3# $FreeBSD: head/etc/rc.d/ypxfrd 231667 2012-02-14 10:51:24Z dougb $
|
4# 5 6# PROVIDE: ypxfrd 7# REQUIRE: rpcbind ypserv 8# KEYWORD: shutdown 9 10. /etc/rc.subr 11 12name="ypxfrd" 13rcvar="nis_ypxfrd_enable"
| 4# 5 6# PROVIDE: ypxfrd 7# REQUIRE: rpcbind ypserv 8# KEYWORD: shutdown 9 10. /etc/rc.subr 11 12name="ypxfrd" 13rcvar="nis_ypxfrd_enable"
|
14command="/usr/sbin/rpc.${name}" 15start_precmd="ypxfrd_precmd"
| 14
|
16load_rc_config $name
| 15load_rc_config $name
|
| 16 17command="/usr/sbin/rpc.${name}"
|
17command_args="${nis_ypxfrd_flags}" 18
| 18command_args="${nis_ypxfrd_flags}" 19
|
| 20start_precmd="ypxfrd_precmd" 21
|
19ypxfrd_precmd() 20{ 21 local _domain 22
| 22ypxfrd_precmd() 23{ 24 local _domain 25
|
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 if ! checkyesno nis_server_enable && \ 29 ! /etc/rc.d/ypserv forcestatus 1>/dev/null 2>&1 30 then 31 force_depend ypserv || return 1 32 fi
| 26 force_depend rpcbind || return 1 27 force_depend ypserv nis_server || return 1
|
33 34 _domain=`domainname` 35 if [ -z "$_domain" ]; then 36 warn "NIS domainname(1) is not set." 37 return 1 38 fi 39} 40 41run_rc_command "$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 36run_rc_command "$1"
|