summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/net_applet
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-07-18 10:44:31 +0000
committerOlivier Blin <oblin@mandriva.org>2005-07-18 10:44:31 +0000
commit263e05adea2c82d3fd71d2a537aa65edc9cd6591 (patch)
tree582c051e8c8f645e8550cc628750cea474208992 /perl-install/standalone/net_applet
parent30331c62e74af33e4e9ed140dad177dd119e6686 (diff)
downloaddrakx-backup-do-not-use-263e05adea2c82d3fd71d2a537aa65edc9cd6591.tar
drakx-backup-do-not-use-263e05adea2c82d3fd71d2a537aa65edc9cd6591.tar.gz
drakx-backup-do-not-use-263e05adea2c82d3fd71d2a537aa65edc9cd6591.tar.bz2
drakx-backup-do-not-use-263e05adea2c82d3fd71d2a537aa65edc9cd6591.tar.xz
drakx-backup-do-not-use-263e05adea2c82d3fd71d2a537aa65edc9cd6591.zip
update menu if interface has been modified
Diffstat (limited to 'perl-install/standalone/net_applet')
-rw-r--r--perl-install/standalone/net_applet10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet
index 4640e4934..4d7508b79 100644
--- a/perl-install/standalone/net_applet
+++ b/perl-install/standalone/net_applet
@@ -139,7 +139,7 @@ sub shouldStart() {
}
sub netMonitor() {
unless (is_running('net_monitor')) {
- system("/usr/sbin/net_monitor --defaultintf $current_interface &")
+ system("/usr/sbin/net_monitor --defaultintf $current_interface &");
checkNetwork();
}
}
@@ -165,11 +165,10 @@ sub checkWireless() {
}
sub checkNetwork() {
checkWireless();
- my ($_is_up, $gw_address);
- ($current_interface, $_is_up, $gw_address) = $watched_interface ?
+ my ($gw_intf, $_is_up, $gw_address) = $watched_interface ?
($watched_interface, network::tools::get_interface_status($watched_interface)) :
network::tools::get_internet_connection($net);
- go2State($gw_address ? 'connected' : $current_interface ? 'disconnected' : 'notconfigured', $current_interface);
+ go2State($gw_address ? 'connected' : $gw_intf ? 'disconnected' : 'notconfigured', $gw_intf);
}
sub checkNetworkForce() {
$net = {};
@@ -192,8 +191,9 @@ sub cronUpdate() {
}
sub go2State {
my ($state_type, $interface) = @_;
- if ($current_state ne $state_type) {
+ if ($current_state ne $state_type || $current_state ne $interface) {
$current_state = $state_type;
+ $current_interface = $interface;
if ($menu) {
foreach (keys %wireless_networks) {
$wireless_networks{$_}{menuitem}->get_parent and $menu->remove($wireless_networks{$_}{menuitem});