From a0c7847c5ba90a7ccc3ba1ea38781396bffaffe6 Mon Sep 17 00:00:00 2001 From: dougb Date: Tue, 28 Sep 2004 09:46:00 +0000 Subject: Create a named chroot directory structure in /var/named, and use it by default when named is enabled. Also, improve our default directory layout by creating /var/named/etc/namedb/{master|slave} directories, and use the former for the generated localhost* files. Rather than using pax to copy device entries, mount devfs in the chroot directory. There may be some corner cases where things need to be adjusted, but overall this structure has been well tested on a production network, and should serve the needs of the vast majority of users. UPDATING has instructions on how to do the conversion for those with existing configurations. --- etc/namedb/make-localhost | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'etc/namedb/make-localhost') diff --git a/etc/namedb/make-localhost b/etc/namedb/make-localhost index f3f0b1d..60fbe49 100755 --- a/etc/namedb/make-localhost +++ b/etc/namedb/make-localhost @@ -32,16 +32,18 @@ fi date=`date +"%Y%m%d"` -mv -f localhost-v6.rev localhost-v6.rev.BAK 2>/dev/null +mkdir -p master + +mv -f master/localhost-v6.rev master/localhost-v6.rev.BAK 2>/dev/null sed -e "s/@host@/$fullhost/g" \ -e "s/@domain@/$domain/g" \ -e "s/@date@/$date/g" \ - < PROTO.localhost-v6.rev > localhost-v6.rev + < PROTO.localhost-v6.rev > master/localhost-v6.rev -mv -f localhost.rev localhost.rev.BAK 2>/dev/null +mv -f master/localhost.rev master/localhost.rev.BAK 2>/dev/null exec sed -e "s/@host@/$fullhost/g" \ -e "s/@domain@/$domain/g" \ -e "s/@date@/$date/g" \ - < PROTO.localhost.rev > localhost.rev + < PROTO.localhost.rev > master/localhost.rev -- cgit v1.1