]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/amd
Add UPDATING entries and bump version.
[FreeBSD/FreeBSD.git] / etc / rc.d / amd
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # PROVIDE: amd
7 # REQUIRE: rpcbind ypset nfsclient FILESYSTEMS ldconfig
8 # BEFORE: DAEMON
9 # KEYWORD: nojail shutdown
10
11 . /etc/rc.subr
12
13 name="amd"
14 desc="Automatically mount filesystems"
15 rcvar="amd_enable"
16 command="/usr/sbin/${name}"
17 start_precmd="amd_precmd"
18 command_args="&"
19 extra_commands="reload"
20
21 amd_precmd()
22 {
23         force_depend nfsclient nfs_client || return 1
24         force_depend rpcbind || return 1
25
26         case ${amd_map_program} in
27         [Nn][Oo] | '')
28                 ;;
29         *)
30                 rc_flags="${rc_flags} `echo $(eval ${amd_map_program})`"
31                 ;;
32         esac
33
34         case "${amd_flags}" in
35         '')
36                 if [ ! -r /etc/amd.conf ]; then
37                         warn 'amd will not load without arguments'
38                         return 1
39                 fi
40                 ;;
41         *)
42                 rc_flags="-p ${rc_flags}"
43                 command_args="> /var/run/amd.pid 2> /dev/null"
44                 ;;
45         esac
46 }
47
48 load_rc_config $name
49 run_rc_command "$1"