Fix two glitches that appear in the non-chroot case. First, if not

chrooted the pid symlink code should not fire. Also, remove the quotes
around the chroot variable in the rndc-confgen invocation so that if
not chrooted the command will still succeed.

Pointed out by:	Sean McNeil <sean@mcneil.com>
This commit is contained in:
Doug Barton 2004-09-24 23:49:38 +00:00
parent 511c05b377
commit ae00aa68e8

View File

@ -66,11 +66,13 @@ named_precmd()
rc_flags="$rc_flags -t $named_chrootdir" rc_flags="$rc_flags -t $named_chrootdir"
confgen_chroot="-t${named_chrootdir}" confgen_chroot="-t${named_chrootdir}"
checkyesno named_chroot_autoupdate && chroot_autoupdate checkyesno named_chroot_autoupdate && chroot_autoupdate
else
named_symlink_enable=NO
fi fi
# Create an rndc.key file for the user if none exists # Create an rndc.key file for the user if none exists
if [ ! -f "${named_chrootdir}/etc/namedb/rndc.key" ]; then if [ ! -f "${named_chrootdir}/etc/namedb/rndc.key" ]; then
rndc-confgen -a -b256 "${confgen_chroot}" rndc-confgen -a -b256 ${confgen_chroot}
fi fi
} }