diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-03-07 14:00:50 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-03-07 14:00:50 +0000 |
commit | 8986c670e7a401e0cc0df145cd6a53cd7d8b5ce4 (patch) | |
tree | 5330a1088844446d7710b0c799921afba1b8859d /perl-install/network/netconnect.pm | |
parent | 4c7971b0ee5613afce9a29701c667ad7b2fadb55 (diff) | |
download | drakx-8986c670e7a401e0cc0df145cd6a53cd7d8b5ce4.tar drakx-8986c670e7a401e0cc0df145cd6a53cd7d8b5ce4.tar.gz drakx-8986c670e7a401e0cc0df145cd6a53cd7d8b5ce4.tar.bz2 drakx-8986c670e7a401e0cc0df145cd6a53cd7d8b5ce4.tar.xz drakx-8986c670e7a401e0cc0df145cd6a53cd7d8b5ce4.zip |
delete gateway if appropriate when configuring DSL devices too (#13978)
Diffstat (limited to 'perl-install/network/netconnect.pm')
-rw-r--r-- | perl-install/network/netconnect.pm | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index be9592490..19ad857bf 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -229,6 +229,15 @@ sub real_main { } }; + my $delete_gateway_settings = sub { + my ($device) = @_; + #- delete gateway settings if gateway device is invalid or matches the reconfigured device + if (!$netc->{GATEWAYDEV} || !exists $eth_intf{$netc->{GATEWAYDEV}} || $netc->{GATEWAYDEV} eq $device) { + delete $netc->{GATEWAY}; + delete $netc->{GATEWAYDEV}; + } + }; + # main wizard: my $wiz; @@ -858,6 +867,8 @@ If you do not know, choose 'use PPPoE'"), $ethntf->{DEVICE} = "`/usr/sbin/fctStartAdsl -i`"; $ethntf->{MII_NOT_SUPPORTED} = "yes"; } + #- delete gateway settings if gateway device is invalid or if reconfiguring the gateway interface + exists $intf->{$ntf_name} and $delete_gateway_settings->($ntf_name); # process static/dhcp ethernet devices: if (exists($intf->{$ntf_name}) && member($adsl_type, qw(manual dhcp))) { $ethntf->{TYPE} = "ADSL"; @@ -1072,10 +1083,7 @@ notation (for example, 1.2.3.4).")), if ($auto_ip) { $in->do_pkgs->install($netc->{dhcp_client}); #- delete gateway settings if gateway device is invalid or if reconfiguring the gateway interface to dhcp - if (!$netc->{GATEWAYDEV} || !exists $eth_intf{$netc->{GATEWAYDEV}} || $netc->{GATEWAYDEV} eq $ntf_name) { - delete $netc->{GATEWAY}; - delete $netc->{GATEWAYDEV}; - } + $delete_gateway_settings->($ntf_name); } return $is_wireless ? "wireless" : "static_hostname"; }, |