From 8b3b736c592fa35ce6b71c0ebbc91a44c42c40f9 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 30 May 2009 19:36:38 +0000 Subject: [PATCH] Option for extra master IPs on remote slaves --- bind8/CHANGELOG | 1 + bind8/bind8-lib.pl | 3 ++- bind8/config.info | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bind8/CHANGELOG b/bind8/CHANGELOG index ca4f1f1b6..17b34d9ff 100644 --- a/bind8/CHANGELOG +++ b/bind8/CHANGELOG @@ -108,3 +108,4 @@ Added mass record change and creation buttons to the zone search results page. Made the manual config file editor textboxes full-width. Fixed a bug that cause blocks like sortlist not be parsed properly, and possible cause Webmin to corrupt other parts of the named.conf file. Redirect and explanation modifiers can be viewed and edited in SPF records. +Added a Module Config option for additional master IP addresses for remote slave zones. diff --git a/bind8/bind8-lib.pl b/bind8/bind8-lib.pl index a16bd2f29..12b513a6c 100644 --- a/bind8/bind8-lib.pl +++ b/bind8/bind8-lib.pl @@ -1532,7 +1532,7 @@ local ($z) = grep { $_->{'value'} eq $_[0] } @zones; return 2 if ($z); # Create it -local @mips = ( $_[1], @{$_[4]} ); +local @mips = &unique($_[1], @{$_[4]}); local $masters = { 'name' => 'masters', 'type' => 1, 'members' => [ map { { 'name' => $_ } } @mips ] }; @@ -2261,6 +2261,7 @@ foreach $slave (@slaves) { map { &to_ipaddress($_->{'host'}) } grep { $_ ne $slave } @slaves; } + push(@otherslaves, split(/\s+/, $config{'extra_slaves'})); # Work out the view my $view; diff --git a/bind8/config.info b/bind8/config.info index 1f360acb4..47fe83899 100644 --- a/bind8/config.info +++ b/bind8/config.info @@ -36,14 +36,17 @@ file_owner=Owner for zone files (user:group),3,Default file_perms=Permissions for zone files (in octal),3,Default default_prins=Default master server for master zones,0,System's hostname default_master=Default master server(s) for slave zones,0 -this_ip=Default master server IP for remote slave zones,3,IP address of hostname -other_slaves=Add other slave IP addresses to masters on slaves?,1,1-Yes,0-No updserial_on=Automatically update serial numbers,1,1-Yes,0-No ipv6_mode=Domain for reverse IPv6 addresses,1,1-ip6.arpa,0-ip6.int confirm_zone=Confirm before deleting zones?,1,1-Yes,0-No confirm_rec=Confirm before deleting records?,1,1-Yes,0-No free_nets=IP networks for free addresses,3,Automatic +line2.5=Cluster slave servers,11 +this_ip=Default master server IP for remote slave zones,3,IP address of hostname +other_slaves=Add other slave IP addresses to list of masters on slaves?,1,1-Yes,0-No +extra_slaves=Additional master IP addresses for slave zones,3,None + line3=System configuration,11 named_conf=Full path to the named.conf file,0 named_path=Full path to the named executable,0