amd revision 124618
114672Sdarcy#!/bin/sh 214672Sdarcy# 314672Sdarcy# $NetBSD: amd,v 1.10 2002/04/29 12:08:17 lukem Exp $ 414672Sdarcy# $FreeBSD: head/etc/rc.d/amd 124618 2004-01-17 10:40:45Z mtm $ 514672Sdarcy# 614672Sdarcy 714672Sdarcy# PROVIDE: amd 814672Sdarcy# REQUIRE: rpcbind mountall ypbind nfsclient 914672Sdarcy# BEFORE: DAEMON 1014672Sdarcy# KEYWORD: FreeBSD 1114672Sdarcy 1214672Sdarcy. /etc/rc.subr 1314672Sdarcy 1414672Sdarcyname="amd" 1514672Sdarcyrcvar=`set_rcvar` 1614672Sdarcycommand="/usr/sbin/${name}" 1714672Sdarcystart_precmd="amd_precmd" 1814672Sdarcycommand_args="&" 1914672Sdarcy 2014672Sdarcyamd_precmd() 2114672Sdarcy{ 2214672Sdarcy if ! checkyesno nfs_client_enable; then 2314672Sdarcy force_depend nfsclient || return 1 2414672Sdarcy fi 2514672Sdarcy 2614672Sdarcy if ! checkyesno rpcbind_enable && \ 2714672Sdarcy ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 2814672Sdarcy then 2914672Sdarcy force_depend rpcbind || return 1 30 fi 31 32 case ${amd_map_program} in 33 [Nn][Oo] | '') 34 ;; 35 *) 36 rc_flags="${rc_flags} `eval ${amd_map_program}`" 37 ;; 38 esac 39 40 case "${amd_flags}" in 41 '') 42 if [ ! -r /etc/amd.conf ]; then 43 warn 'amd will not load without arguments' 44 return 1 45 fi 46 ;; 47 *) 48 rc_flags="-p ${rc_flags} > /var/run/amd.pid 2> /dev/null" \ 49 ;; 50 esac 51 return 0 52} 53 54load_rc_config $name 55run_rc_command "$1" 56