dma: move sender into queue
[dragonfly.git] / etc / rc.d / amd
blob2ba0019380280ab9b3e237b3fb2692481e5385e4
1 #!/bin/sh
3 # $NetBSD: amd,v 1.10 2002/04/29 12:08:17 lukem Exp $
4 # $FreeBSD: src/etc/rc.d/amd,v 1.9 2002/10/12 10:31:31 schweikh Exp $
5 # $DragonFly: src/etc/rc.d/amd,v 1.5 2005/11/19 21:47:32 swildner Exp $
8 # PROVIDE: amd
9 # REQUIRE: rpcbind mountcritremote ypbind nfsclient
10 # BEFORE: DAEMON
12 . /etc/rc.subr
14 name="amd"
15 rcvar=`set_rcvar`
16 command="/usr/sbin/${name}"
18 start_precmd="amd_precmd"
19 command_args="&"
21 amd_precmd()
23 if ! checkyesno nfs_client_enable; then
24 force_depend nfsclient || return 1
27 if ! checkyesno rpcbind_enable && \
28 ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
29 then
30 force_depend rpcbind || return 1
33 case ${amd_map_program} in
34 [Nn][Oo] | '')
37 rc_flags="${rc_flags} `eval ${amd_map_program}`"
39 esac
41 case "${amd_flags}" in
42 '')
43 if [ ! -r /etc/amd.conf ]; then
44 warn 'amd will not load without arguments'
45 return 1
48 esac
51 load_rc_config $name
52 run_rc_command "$1"