amd revision 240336
178344Sobrien#!/bin/sh 278344Sobrien# 398184Sgordon# $FreeBSD: head/etc/rc.d/amd 240336 2012-09-11 05:04:59Z obrien $ 478344Sobrien# 578344Sobrien 678344Sobrien# PROVIDE: amd 7240336Sobrien# REQUIRE: rpcbind ypset nfsclient FILESYSTEMS ldconfig 898184Sgordon# BEFORE: DAEMON 9180564Sdougb# KEYWORD: nojail shutdown 1078344Sobrien 1178344Sobrien. /etc/rc.subr 1278344Sobrien 1378344Sobrienname="amd" 14230099Sdougbrcvar="amd_enable" 1598585Sdougbcommand="/usr/sbin/${name}" 16124618Smtmstart_precmd="amd_precmd" 17124618Smtmcommand_args="&" 18163487Sflzextra_commands="reload" 1978344Sobrien 20104980Sschweikhamd_precmd() 2198184Sgordon{ 22231667Sdougb force_depend nfsclient nfs_client || return 1 23231667Sdougb force_depend rpcbind || return 1 2498486Sdougb 25124618Smtm case ${amd_map_program} in 26124618Smtm [Nn][Oo] | '') 27124618Smtm ;; 28124618Smtm *) 29172822Smtm rc_flags="${rc_flags} `echo $(eval ${amd_map_program})`" 30124618Smtm ;; 31124618Smtm esac 3298184Sgordon 33124618Smtm case "${amd_flags}" in 34124618Smtm '') 35124618Smtm if [ ! -r /etc/amd.conf ]; then 36124618Smtm warn 'amd will not load without arguments' 37124618Smtm return 1 38124618Smtm fi 3998184Sgordon ;; 40124618Smtm *) 41172822Smtm rc_flags="-p ${rc_flags}" 42172977Smtm command_args="> /var/run/amd.pid 2> /dev/null" 43124618Smtm ;; 4498184Sgordon esac 4598184Sgordon} 4698184Sgordon 4798184Sgordonload_rc_config $name 4878344Sobrienrun_rc_command "$1" 49