diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-06-03 10:45:33 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-06-03 10:45:33 +0000 |
commit | 518affd38b5ea83c5ae5bd1c4bd1b06001ddc5df (patch) | |
tree | 1fd772c5d3f8d872f42c293d3d8821785005d56f | |
parent | 258602e2fd8f3677abe6263be5a21eedf8a6823a (diff) | |
download | mgaonline-518affd38b5ea83c5ae5bd1c4bd1b06001ddc5df.tar mgaonline-518affd38b5ea83c5ae5bd1c4bd1b06001ddc5df.tar.gz mgaonline-518affd38b5ea83c5ae5bd1c4bd1b06001ddc5df.tar.bz2 mgaonline-518affd38b5ea83c5ae5bd1c4bd1b06001ddc5df.tar.xz mgaonline-518affd38b5ea83c5ae5bd1c4bd1b06001ddc5df.zip |
use new network::network::read_net_conf, but keep compatibility for older releases
-rwxr-xr-x | mdkapplet | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -346,18 +346,25 @@ sub go2State { defined $textvw and refresh_status($state); } sub isNetwork { - my ($netcnx, $netc, $intf) = ({}, {}, {}); my $r = mdkonline::get_release(); # my $h = mdkonline::get_distro_type(); my $network; if ($r <= 10.0) { $network = gethostbyname("mandrivaonline.net") ? 1 : 0; - } else { + } elsif ($r <= 10.2) { require network::netconnect; - require network::tools; + require network::tools; + my ($netcnx, $netc, $intf) = ({}, {}, {}); network::netconnect::read_net_conf($netcnx, $netc, $intf); - my ($gw_intf, $is_up, $gw_address, $dns_server) = network::tools::get_internet_connection($netc, $intf); - $network = $gw_address ? 1 : 0; + my ($_gw_intf, $_is_up, $gw_address, $_dns_server) = network::tools::get_internet_connection($netc, $intf); + $network = to_bool($gw_address); + } else { + require network::network; + require network::tools; + my $net = {}; + network::network::read_net_conf($net); + my ($_gw_intf, $_is_up, $gw_address, $_dns_server) = network::tools::get_internet_connection($net); + $network = to_bool($gw_address); } $network; } |