Add gcc40 build hooks. Gcc40 isn't built per default, you will have to
[dragonfly.git] / etc / rc.d / named
1 #!/bin/sh
2 #
3 # $NetBSD: named,v 1.10 2002/03/22 04:33:59 thorpej Exp $
4 # $FreeBSD: src/etc/rc.d/named,v 1.6 2003/01/12 04:53:54 mtm Exp $
5 # $DragonFly: src/etc/rc.d/named,v 1.5 2004/05/31 17:51:47 dillon Exp $
6 #
7
8 # PROVIDE: named
9 # REQUIRE: SERVERS
10 # BEFORE:  DAEMON
11 # KEYWORD: DragonFly 
12
13 . /etc/rc.subr
14
15 name="named"
16 rcvar=`set_rcvar`
17 command="/usr/sbin/${name}"
18 start_precmd="named_precmd"
19 required_dirs="$named_chrootdir"        # if it is set, it must exist
20 extra_commands="reload"
21
22 nuser=bind
23
24 named_precmd()
25 {
26         # Is the user using a sandbox?
27         if [ -z "$named_chrootdir" ]; then
28                 rc_flags="-u $nuser $rc_flags"
29                 return 0
30         fi
31
32         #       Change run_rc_commands()'s internal copy of $named_flags
33         #
34         rc_flags="-u $nuser -t ${named_chrootdir} $rc_flags"
35 }
36
37 load_rc_config $name
38 # The following variable requires that rc.conf be loaded first
39 #
40 required_dirs="$named_chrootdir"        # if it is set, it must exist
41 pidfile="${named_chrootdir}${named_pidfile:-/var/run/${name}.pid}"
42
43 run_rc_command "$1"