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 | |
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
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | mdkapplet | 12 |
2 files changed, 4 insertions, 10 deletions
@@ -1,3 +1,5 @@ +- simplify network detection + Version 2.36 - 14 March 2008, Thierry Vignaud - mdkapplet: @@ -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'); |