198184Sgordon#!/bin/sh 298184Sgordon# 398184Sgordon# $FreeBSD: releng/10.2/etc/rc.d/ypxfrd 231667 2012-02-14 10:51:24Z dougb $ 498184Sgordon# 598184Sgordon 698184Sgordon# PROVIDE: ypxfrd 7161532Sflz# REQUIRE: rpcbind ypserv 8180564Sdougb# KEYWORD: shutdown 998184Sgordon 1098184Sgordon. /etc/rc.subr 1198184Sgordon 1298184Sgordonname="ypxfrd" 1398184Sgordonrcvar="nis_ypxfrd_enable" 14231667Sdougb 15231667Sdougbload_rc_config $name 16231667Sdougb 1798184Sgordoncommand="/usr/sbin/rpc.${name}" 1898184Sgordoncommand_args="${nis_ypxfrd_flags}" 1998184Sgordon 20231667Sdougbstart_precmd="ypxfrd_precmd" 21231667Sdougb 2298184Sgordonypxfrd_precmd() 2398184Sgordon{ 24165664Syar local _domain 25165664Syar 26231667Sdougb force_depend rpcbind || return 1 27231667Sdougb force_depend ypserv nis_server || return 1 28101851Sgordon 29104980Sschweikh _domain=`domainname` 30104980Sschweikh if [ -z "$_domain" ]; then 31117346Smtm warn "NIS domainname(1) is not set." 32104980Sschweikh return 1 33104980Sschweikh fi 3498184Sgordon} 3598184Sgordon 3698184Sgordonrun_rc_command "$1" 37