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