summaryrefslogtreecommitdiffstats
path: root/dns_wizard/Bind.pm
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-03-09 12:41:12 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-03-09 12:41:12 +0000
commit929e8501b67e87374dea6731fb270c2829fb56c5 (patch)
tree5d2056fe1f70f586de5925c31cb4dba7f3667550 /dns_wizard/Bind.pm
parentbd7c819df987cb88bacad87db1cdb6d154357473 (diff)
downloaddrakwizard-929e8501b67e87374dea6731fb270c2829fb56c5.tar
drakwizard-929e8501b67e87374dea6731fb270c2829fb56c5.tar.gz
drakwizard-929e8501b67e87374dea6731fb270c2829fb56c5.tar.bz2
drakwizard-929e8501b67e87374dea6731fb270c2829fb56c5.tar.xz
drakwizard-929e8501b67e87374dea6731fb270c2829fb56c5.zip
cant access add/remove hosts if host is a DNS slave
Diffstat (limited to 'dns_wizard/Bind.pm')
-rw-r--r--dns_wizard/Bind.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/dns_wizard/Bind.pm b/dns_wizard/Bind.pm
index 9d5a3ad1..b06be23a 100644
--- a/dns_wizard/Bind.pm
+++ b/dns_wizard/Bind.pm
@@ -53,7 +53,7 @@ my $TEXTINFO = "dns Wizard";
my $REP_SAVE = "/tmp/bck";
my $ZONE_DIR = $NAMED_DIR . "/zone";
my $DATE = `date +%d-%m-20%y`;
-#my $ft = "/var/named/master_srv";
+my $ft = "/etc/sysconfig/wizard_dns";
my $o = {
@@ -109,12 +109,13 @@ $o->{pages} = {
$o->{var}{wiz_level} ||= 1;
},
post => sub {
-# -f $ft or return 'error_notmaster';
if ($o->{var}{wiz_level} == 2) {
return 'slave' }
- elsif ($o->{var}{wiz_level} == 3) {
+ elsif ($o->{var}{wiz_level} == 1) {
+ return 'ipforward' }
+ elsif ($o->{var}{wiz_level} == 3 && -f $ft or return 'error_notmaster') {
return 'addhost' }
- elsif ($o->{var}{wiz_level} == 4) {
+ elsif ($o->{var}{wiz_level} == 4 && -f $ft or return 'error_notmaster') {
return 'removehost' }
},
data => [
@@ -689,7 +690,7 @@ sub do_it_master {
return if $::testing;
my $in = 'interactive'->vnew('su', 'dns');
my $w = $in->wait_message(N("Master DNS server"), N("Configuring your system as Master DNS server ..."));
-# system("touch $ft");
+ system("touch $ft");
do_it();
crea_iprev($IPSERVER, $DOMAINNAME);
crea_ipnorm($IPSERVER, $DOMAINNAME);
@@ -703,6 +704,7 @@ sub do_it_slave {
return if $::testing;
my $in = 'interactive'->vnew('su', 'dns');
my $w = $in->wait_message(N("Slave DNS server"), N("Configuring your system as Slave DNS server ..."));
+ if (-f $ft) { unlink $ft }
do_it();
rm_rf(glob("$NAMED_DIR/bak*"));
crea_named_slave($IPSERVER, $DOMAINNAME, $o->{var}{IPMASTER});