diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-19 15:38:02 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-19 15:38:02 +0000 |
commit | 7baaaf3a4df20c75ebbfc981ab1995f0ea6e9fd3 (patch) | |
tree | b913b272efa51fce280200f8994bec6d3d087116 /mdkapplet | |
parent | 3a98c73fa8b604e9d80d757ac80da703ec886fe0 (diff) | |
download | mgaonline-7baaaf3a4df20c75ebbfc981ab1995f0ea6e9fd3.tar mgaonline-7baaaf3a4df20c75ebbfc981ab1995f0ea6e9fd3.tar.gz mgaonline-7baaaf3a4df20c75ebbfc981ab1995f0ea6e9fd3.tar.bz2 mgaonline-7baaaf3a4df20c75ebbfc981ab1995f0ea6e9fd3.tar.xz mgaonline-7baaaf3a4df20c75ebbfc981ab1995f0ea6e9fd3.zip |
simplify network detection
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -413,7 +413,8 @@ sub setLastTime() { } sub checkNetwork() { - if (!isNetwork()) { + require network::tools; + if (!network::tools::has_network_connection()) { # do not notify if already done: return if member($state_global, qw(disconnected)); logIt(N_("Checking Network: seems disabled\n")); @@ -434,15 +435,6 @@ sub go2State { $state_global = $state; } -sub isNetwork() { - 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); - to_bool($gw_address); -} - sub shouldStart() { my %p = getVarsFromSh($localfile); to_bool($p{AUTOSTART} ne 'FALSE'); |