summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-19 15:38:02 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-19 15:38:02 +0000
commit7baaaf3a4df20c75ebbfc981ab1995f0ea6e9fd3 (patch)
treeb913b272efa51fce280200f8994bec6d3d087116 /mdkapplet
parent3a98c73fa8b604e9d80d757ac80da703ec886fe0 (diff)
downloadmgaonline-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-xmdkapplet12
1 files changed, 2 insertions, 10 deletions
diff --git a/mdkapplet b/mdkapplet
index c5318e2e..db27cd01 100755
--- a/mdkapplet
+++ b/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');