mtree: No longer create /usr/libdata/msdosfs.
[dragonfly.git] / etc / rc.d / amd
1 #!/bin/sh
2 #
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 $
6 #
7
8 # PROVIDE: amd
9 # REQUIRE: rpcbind mountcritremote ypbind nfsclient
10 # BEFORE: DAEMON
11
12 . /etc/rc.subr
13
14 name="amd"
15 rcvar=`set_rcvar`
16 command="/usr/sbin/${name}"
17
18         start_precmd="amd_precmd"
19         command_args="&"
20
21 amd_precmd()
22 {
23                 if ! checkyesno nfs_client_enable; then
24                         force_depend nfsclient || return 1
25                 fi
26
27                 if ! checkyesno rpcbind_enable  && \
28                         ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1
29                         then
30                                 force_depend rpcbind || return 1
31                 fi
32
33                 case ${amd_map_program} in
34                         [Nn][Oo] | '')
35                         ;;
36                 *)
37                         rc_flags="${rc_flags} `eval ${amd_map_program}`"
38                         ;;
39                 esac
40
41                 case "${amd_flags}" in
42                         '')
43                         if [ ! -r /etc/amd.conf ]; then
44                                 warn 'amd will not load without arguments'
45                                 return 1
46                         fi
47                         ;;
48                 esac
49 }
50
51 load_rc_config $name
52 run_rc_command "$1"