summaryrefslogtreecommitdiffstats
path: root/dns_wizard
diff options
context:
space:
mode:
Diffstat (limited to 'dns_wizard')
-rw-r--r--dns_wizard/Bind.pm34
1 files changed, 29 insertions, 5 deletions
diff --git a/dns_wizard/Bind.pm b/dns_wizard/Bind.pm
index 0600f326..a736a064 100644
--- a/dns_wizard/Bind.pm
+++ b/dns_wizard/Bind.pm
@@ -26,10 +26,10 @@ use services;
use common;
use MDK::Wizard::Varspaceval;
use MDK::Wizard::Wizcommon;
-
+use network::network;
my $wiz = new MDK::Wizard::Wizcommon;
-
+my $in = interactive->vnew;
my $SERIAL = chomp_(`date +20%y%m%d`);
my $HOSTNAME = $wiz->{net}->network_get("HOSTNAME");
my $BIND_CHROOT = "/var/lib/named";
@@ -132,7 +132,15 @@ $o->{pages} = {
{ label => N("Name of the machine:"), val => \$o->{var}{CLIENTNAME} },
{ label => N("IP address of the machine:"), val => \$o->{var}{CLIENTIP} },
],
- post => \&check_iph,
+ complete => sub {
+ if ($o->{var}{CLIENTIP}) {
+ if (!is_ip($o->{var}{CLIENTIP})) {
+ #$in->ask_warn(N('Error'), N('This is not a valid IP address.'));
+ return 1;
+ } else { return 0; }
+ }
+ },
+ no_back => 1,
next => 'summaryadd', no_back => 1,
},
removehost => {
@@ -148,7 +156,15 @@ $o->{pages} = {
data => [
{ label => N("IP Address of the master DNS server:"), val => \$o->{var}{IPMASTER} },
],
- post => \&check_ipm,
+ complete => sub {
+ if ($o->{var}{IPMASTER}) {
+ if (!is_ip($o->{var}{IPMASTER})) {
+ #$in->ask_warn(N('Error'), N('This is not a valid IP address.'));
+ return 1;
+ } else { return 0; }
+ }
+ },
+ no_back => 1,
next => 'summaryslave',
},
@@ -161,7 +177,15 @@ $o->{pages} = {
data => [
{ label => N("External DNS:"), val => \$o->{var}{IPOFFORWARDER} },
],
- post => \&check_ipf,
+ complete => sub {
+ if ($o->{var}{IPOFFORWARDER}) {
+ if (!is_ip($o->{var}{IPOFFORWARDER})) {
+ #$in->ask_warn(N('Error'), N('This is not a valid IP address for your forwarder.'));
+ return 1;
+ } else { return 0; }
+ }
+ },
+ no_back => 1,
next => 'addsearch',
},
addsearch => {