diff options
author | Antoine Ginies <aginies@mandriva.com> | 2006-09-13 12:32:32 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2006-09-13 12:32:32 +0000 |
commit | c79bb77f86bb67e5a765d667c06e986291d86596 (patch) | |
tree | 7f3ad4baea5d3a890fc18b6e007848ca878394bd /dns_wizard | |
parent | 2b56445de439bf7865f9824ab535a4096867f47a (diff) | |
download | drakwizard-c79bb77f86bb67e5a765d667c06e986291d86596.tar drakwizard-c79bb77f86bb67e5a765d667c06e986291d86596.tar.gz drakwizard-c79bb77f86bb67e5a765d667c06e986291d86596.tar.bz2 drakwizard-c79bb77f86bb67e5a765d667c06e986291d86596.tar.xz drakwizard-c79bb77f86bb67e5a765d667c06e986291d86596.zip |
fix bug #25508
Diffstat (limited to 'dns_wizard')
-rw-r--r-- | dns_wizard/Bind.pm | 34 |
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 => { |