summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/net_monitor
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-06-03 07:14:48 +0000
committerOlivier Blin <oblin@mandriva.org>2005-06-03 07:14:48 +0000
commit8fc41a1333f01496878ca0561f3ca1ad186b6d64 (patch)
tree2dd030c580d5b8e954bce95508ac7ecacc6127b9 /perl-install/standalone/net_monitor
parent671adafbfbb78f044970bc4af895ed43dff99757 (diff)
downloaddrakx-backup-do-not-use-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar
drakx-backup-do-not-use-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.gz
drakx-backup-do-not-use-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.bz2
drakx-backup-do-not-use-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.xz
drakx-backup-do-not-use-8fc41a1333f01496878ca0561f3ca1ad186b6d64.zip
- merge network settings in a $net hash (it modifies $o fields too):
o $netc becomes $net->{network} and $net->{resolv} o $intf becomes $net->{ifcfg} - move zeroconf config stuff in write_zeroconf - read_tmdns_conf -> read_zeroconf - read_all_conf -> read_net_conf - configureNetwork2 -> configure_network - configure_network: write ifcfg files for ppp interfaces too - don't install wireless-tools in configure_network, this package is in basesystem - most functions don't need the file path as an argument in network::network - drop network::tools::remove_initscript - don't export too much from network::network - don't export from network::tools - remove adsl_unsupported_eci step in drakconnect - drop passwd2 field in network::adsl - drop $net->{isdn_internal} - network::netconnect : main -> safe_main - use network::netconnect::real_main during install - don't read network config in network::netconnect::real_main - install_steps::upNetwork : resolv.conf is already symlinked by network::network::configure_network when appropriate - try to fix install_any::generate_automatic_stage1_params to use a real interface configuration - put authentication stuff in $net->{auth} - drop network::ethernet::write_ether_conf - drop network::adsl::get_wizard - use 'static' instead of 'manual' as ADSL method - drop first_modem and its workarounds in network::modem - drop deprecated "multiple_internet_cnx" step in drakconnect - don't save /etc/sysconfig/drakconnect anymore - drop MDK::Common::Globals stuff - drop getIP in net_applet (Pixel) - drop $netc->{DHCP} - configure_network(): write resolv.conf even if a dhcp interface is configured
Diffstat (limited to 'perl-install/standalone/net_monitor')
-rwxr-xr-xperl-install/standalone/net_monitor21
1 files changed, 9 insertions, 12 deletions
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor
index 240a67049..9904d08b2 100755
--- a/perl-install/standalone/net_monitor
+++ b/perl-install/standalone/net_monitor
@@ -29,25 +29,22 @@ use c;
use interactive;
use ugtk2 qw(:create :helpers :wrappers);
use common;
-use network::netconnect;
+use network::network;
use network::tools;
-use MDK::Common::Globals "network", qw($in);
use POSIX;
$ugtk2::wm_icon = "/usr/share/mcc/themes/default/net_monitor-mdk.png";
-if ("@ARGV" =~ /--status/) { print connected(); exit(0) }
+if ("@ARGV" =~ /--status/) { print network::tools::connected(); exit(0) }
my $force = "@ARGV" =~ /--force/;
my $quiet = "@ARGV" =~ /--quiet/;
my $connect = "@ARGV" =~ /--connect/;
my $disconnect = "@ARGV" =~ /--disconnect/;
my ($default_intf) = "@ARGV" =~ /--defaultintf (\w+)/;
-my $netcnx = {};
-my $netc = {};
-my $intf = {};
-network::netconnect::read_net_conf($netcnx, $netc, $intf);
-$default_intf ||= network::tools::get_default_gateway_interface($netc, $intf);
+my $net = {};
+network::network::read_net_conf($net);
+$default_intf ||= $net->{default}{interface};
if ($force) {
$connect and network::tools::start_interface($default_intf);
@@ -313,7 +310,7 @@ sub rescan() {
$monitor->{sta} = 0;
$monitor->{nba} = 0;
}
- $label_cnx_type->set_label(translate($netcnx->{type}));
+ $label_cnx_type->set_label(translate($net->{type}));
$monitor->{$_} = 0 foreach 'sr', 'st';
1;
}
@@ -461,17 +458,17 @@ sub update() {
}
@interfaces = @intfs;
if ($isconnected != -2 && $isconnected != -1 && !$during_connection) {
- if ($isconnected == 1 && !in_ifconfig($netcnx->{NET_INTERFACE})) {
+ if ($isconnected == 1 && !in_ifconfig($net->{net_interface})) {
$isconnected = 0;
$statusbar->pop(1);
$statusbar->push(1, N("Warning, another internet connection has been detected, maybe using your network"));
} else {
- #- translators : $netcnx->{type} is the type of network connection (modem, adsl...)
+ #- translators : $net->{type} is the type of network connection (modem, adsl...)
$statusbar->pop(1);
$statusbar->push(1, $isconnected == 1 ? N("Connected") : N("Not connected"));
}
$button_connect->set_sensitive(1);
- $button_connect->set("label", $isconnected == 1 ? N("Disconnect %s", translate($netcnx->{type})) : N("Connect %s", $netcnx->{type}));
+ $button_connect->set("label", $isconnected == 1 ? N("Disconnect %s", translate($net->{type})) : N("Connect %s", $net->{type}));
}
unless ($default_intf || @interfaces) {
$button_connect->set_sensitive(0);