aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2010-05-08 22:24:01 +0000
committerDoug Barton <dougb@FreeBSD.org>2010-05-08 22:24:01 +0000
commitad14656b57f861bddabd7286d9b6aa761fea1879 (patch)
tree17ac54bc68b2d69bcf4acfda1ce906bcff2ceac5 /etc
parent5857a1b3a6a538f5635ca8f154cacb83a313aaa5 (diff)
Notes
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.d/named14
1 files changed, 10 insertions, 4 deletions
diff --git a/etc/rc.d/named b/etc/rc.d/named
index 346b6fc9dd41..81db6463dd3d 100755
--- a/etc/rc.d/named
+++ b/etc/rc.d/named
@@ -192,6 +192,13 @@ named_prestart()
$confgen_command
fi
+ local checkconf
+
+ checkconf="${command%/named}/named-checkconf"
+ if ! checkyesno named_chroot_autoupdate && [ -n "$named_chrootdir" ]; then
+ checkconf="$checkconf -t $named_chrootdir"
+ fi
+
# Create a forwarder configuration based on /etc/resolv.conf
if checkyesno named_auto_forward; then
if [ ! -s /etc/resolv.conf ]; then
@@ -201,7 +208,7 @@ named_prestart()
[ -s "${named_confdir}/auto_forward.conf" ] &&
create_file ${named_confdir}/auto_forward.conf
- ${command%/named}/named-checkconf $named_conf ||
+ $checkconf $named_conf ||
err 3 'named-checkconf for $named_conf failed'
return
fi
@@ -263,8 +270,7 @@ named_prestart()
create_file ${named_confdir}/auto_forward.conf
fi
- ${command%/named}/named-checkconf $named_conf ||
- err 3 'named-checkconf for $named_conf failed'
+ $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed'
}
load_rc_config $name
@@ -272,7 +278,7 @@ load_rc_config $name
# Updating the following variables requires that rc.conf be loaded first
#
required_dirs="$named_chrootdir" # if it is set, it must exist
-required_files="${named_conf:=/etc/namedb/named.conf}"
+
pidfile="${named_pidfile:-/var/run/named/pid}"
named_confdir="${named_chrootdir}${named_conf%/*}"