From 5b69b3109e1a8fe40e4f938024c82e5e1a844853 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 31 Oct 2007 14:39:10 +0000 Subject: [PATCH] Fix dns behavior from makedns some. The change is that now makedns will do something intelligent with the forwarders site table entry. If that is not set, it creates an empty db.cache to make non-cluster DNS lookup attempts rejected immediately. More full fixes to follow, but this behavior as is cause misleading problems git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@29 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/usr/lib/xcat/plugins/bind.pm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/bind.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/bind.pm index ed14b83e0..5cc6f4912 100755 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/bind.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/bind.pm @@ -536,6 +536,13 @@ sub FIXUP { } else { print BOOT qq|\noptions {\n\tdirectory "$DBDir";\n|; + if (@forwarders) { + print BOOT qq|\tforwarders {\n|; + foreach (@forwarders) { + print BOOT qq|\t\t$_;\n|; + } + print BOOT qq|\t};\n|; + } if (-r "spcl.options") { print BOOT "\t# These options came from the file spcl.options\n"; # @@ -553,7 +560,9 @@ sub FIXUP { foreach $line (@bootmsgs_v8) { print BOOT $line; } - #print BOOT qq|zone "." in {\n\ttype hint;\n\tfile "db.cache";\n};\n\n|; + unless (@forwarders) { + print BOOT qq|zone "." in {\n\ttype hint;\n\tfile "db.cache";\n};\n\n|; + } if (-r "spcl.boot") { print BOOT qq|include "spcl.boot";\n\n|; } @@ -568,6 +577,9 @@ sub FIXUP { $file = "DB.127.0.0.1"; &MAKE_SOA($DBDir."db.127.0.0", $file); + my $nothing; + open($nothing,">>",$DBDir."db.cache"); + close($nothing); printf $file "%-30s\tIN PTR localhost.\n", &REVERSE("127.0.0.1"); close($file); } @@ -852,7 +864,7 @@ sub SUBNETS { sub GEN_BOOT { local(*F, $revaddr, $n); - if (! -e "boot.cacheonly") { + if (0) { #! -e "boot.cacheonly") { DISABLE THIS PART # # Create a boot file for a cache-only server #