From 864b927cc508c1dc7d1fdc130c75e07b81a195a0 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Thu, 5 Aug 2004 02:56:28 +0000 Subject: fix pb of removing nodes (thx chandra bug report) --- dns_wizard/Bind.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'dns_wizard') diff --git a/dns_wizard/Bind.pm b/dns_wizard/Bind.pm index f876c8e8..b77e9887 100644 --- a/dns_wizard/Bind.pm +++ b/dns_wizard/Bind.pm @@ -73,9 +73,9 @@ my $o = { if ($SHORTHOSTNAME =~ /localhost/) { return 0, N("You need to readjust your hostname.") } - if (($DOMAINNAME eq "" || $DOMAINNAME eq "(none)") or ($HOSTNAME eq "localhost")) { + if (member($DOMAINNAME, qw(localdomain (none)))) { return 0, N("You need to readjust your domainname. For a DNS server you need a correct domainname, not equal to localdomain or none. Launch drakconnect to adjust it.") - } + } 1 }, }; @@ -113,10 +113,10 @@ $o->{pages} = { return 'slave' } 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 && -f $ft or return 'error_notmaster') { - return 'removehost' } + elsif ($o->{var}{wiz_level} == 3) { + if (-f $ft) { return 'addhost' } else { return 'error_notmaster' } } + elsif ($o->{var}{wiz_level} == 4) { + if (-f $ft) { return 'removehost' } else { return 'error_notmaster' } } }, data => [ { label => N("What do you want to do:"), val => \$o->{var}{wiz_level}, list => [ keys %level ], format => sub { $level{$_[0]} } }, -- cgit v1.2.1