summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-09-01 05:11:07 +0000
committerOlivier Blin <oblin@mandriva.org>2004-09-01 05:11:07 +0000
commit7fd99ddc0bcba9ec85d17039c0abcfb33c442e2a (patch)
tree7e207bd6b7d3353bf46054474cbc87504f4a2b79
parent61b18fa96b09b3fcdc67b2d0107ca638ecb79542 (diff)
downloaddrakx-7fd99ddc0bcba9ec85d17039c0abcfb33c442e2a.tar
drakx-7fd99ddc0bcba9ec85d17039c0abcfb33c442e2a.tar.gz
drakx-7fd99ddc0bcba9ec85d17039c0abcfb33c442e2a.tar.bz2
drakx-7fd99ddc0bcba9ec85d17039c0abcfb33c442e2a.tar.xz
drakx-7fd99ddc0bcba9ec85d17039c0abcfb33c442e2a.zip
revert titi fix, do not return random interface if internet connection
is not configured
-rw-r--r--perl-install/network/tools.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index d77a934e1..338cbf4c8 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -270,9 +270,7 @@ sub get_internet_connection {
my ($netc, $intf, $o_gw_intf) = @_;
my @routes = `$::prefix/sbin/ip route show`;
my ($gw_intf, $is_up, $gw_address);
- $gw_intf = $o_gw_intf || get_default_gateway_interface($netc, $intf) ||
- if_(`$::prefix/sbin/ip route show` =~ m!^[0-9a-f./]*\s+dev\s+(\S+)!m, $1)
- or return;
+ $gw_intf = $o_gw_intf || get_default_gateway_interface($netc, $intf) or return;
$is_up = to_bool(grep { /\s+dev\s+$gw_intf(?:\s+|$)/ } @routes);
($gw_address) = join('', @routes) =~ /^default\s+via\s+(\S+).*\s+dev\s+$gw_intf(?:\s+|$)/m;
return $gw_intf, $is_up, $gw_address, $netc->{dnsServer};