summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-10-03 14:02:43 +0000
committerOlivier Blin <oblin@mandriva.org>2004-10-03 14:02:43 +0000
commit30411c4ddd878b8bf314665cf59483e27f5340ad (patch)
tree84bbb3e5ed32fd27422ecb8c3ee8ecf94c18afd8
parenta1c7f4b63de4e096cb1ac62db6a6e7ce0d87c62a (diff)
downloaddrakx-30411c4ddd878b8bf314665cf59483e27f5340ad.tar
drakx-30411c4ddd878b8bf314665cf59483e27f5340ad.tar.gz
drakx-30411c4ddd878b8bf314665cf59483e27f5340ad.tar.bz2
drakx-30411c4ddd878b8bf314665cf59483e27f5340ad.tar.xz
drakx-30411c4ddd878b8bf314665cf59483e27f5340ad.zip
do not break the "IP %s address is usually reserved" warning
-rw-r--r--perl-install/network/netconnect.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index cb46efbd4..ef82e07b0 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -989,9 +989,15 @@ notation (for example, 1.2.3.4).")),
$in->ask_warn(N("Error"), N("IP address should be in format 1.2.3.4"));
return 1, $bad[0];
}
- $in->ask_warn(N("Error"), N("Warning: IP address %s is usually reserved!", $ethntf->{IPADDR})) if is_ip_forbidden($ethntf->{IPADDR});
- #- test if IP address is already used (do not test for sagem DSL devices since it may use many ifcfg files)
- $in->ask_warn(N("Error"), N("%s already in use\n", $ethntf->{IPADDR})) if $ethntf != $intf->{sagem} && find { $_->{DEVICE} ne $ethntf->{DEVICE} && $_->{IPADDR} eq $ethntf->{IPADDR} } values %$intf;
+ if (is_ip_forbidden($ethntf->{IPADDR})) {
+ $in->ask_warn(N("Error"), N("Warning: IP address %s is usually reserved!", $ethntf->{IPADDR}));
+ return 1;
+ }
+ #- test if IP address is already used (do not test for sagem DSL devices since it may use many ifcfg files)
+ if ($ethntf->{DEVICE} !~ /eagle/ && find { $_->{DEVICE} ne $ethntf->{DEVICE} && $_->{IPADDR} eq $ethntf->{IPADDR} } values %$intf) {
+ $in->ask_warn(N("Error"), N("%s already in use\n", $ethntf->{IPADDR}));
+ return 1;
+ }
},
focus_out => sub {
$ethntf->{NETMASK} ||= netmask($ethntf->{IPADDR}) unless $_[0]