summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-04-07 23:00:23 +0000
committerdamien <damien@mandriva.com>2001-04-07 23:00:23 +0000
commit3cdee7cb91f1e6808b080560acf11dd9dff077c6 (patch)
tree68cda9d6717d788d803bacf93a5c03548ab8d96a /perl-install
parente5866166bc3ffb8cdff922d82598e3d37e68a325 (diff)
downloaddrakx-3cdee7cb91f1e6808b080560acf11dd9dff077c6.tar
drakx-3cdee7cb91f1e6808b080560acf11dd9dff077c6.tar.gz
drakx-3cdee7cb91f1e6808b080560acf11dd9dff077c6.tar.bz2
drakx-3cdee7cb91f1e6808b080560acf11dd9dff077c6.tar.xz
drakx-3cdee7cb91f1e6808b080560acf11dd9dff077c6.zip
net_monitor incorporation
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile.config2
-rwxr-xr-xperl-install/standalone/net_monitor9
2 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/Makefile.config b/perl-install/Makefile.config
index 78f829ae3..01edefaa5 100644
--- a/perl-install/Makefile.config
+++ b/perl-install/Makefile.config
@@ -5,7 +5,7 @@ VERSION = 2.2.10-BOOT
SUDO = sudo
SO_FILES = c/blib/arch/auto/c/c.so
PMS = *.pm Newt/*.pm c/stuff.pm resize_fat/*.pm sbus_probing/*.pm commands install2 g_auto_install live_install live_install2
-STANDALONEPMS= diskdrake XFdrake mousedrake printerdrake keyboarddrake draknet tinyfirewall drakxconf drakxservices draksec drakboot adduserdrake drakgw livedrake
+STANDALONEPMS= diskdrake XFdrake mousedrake printerdrake keyboarddrake draknet net_monitor tinyfirewall drakxconf drakxservices draksec drakboot adduserdrake drakgw livedrake
PMS += $(STANDALONEPMS:%=standalone/%)
REP4PMS = /usr/bin/perl-install
ROOTDEST = /export
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor
index 254fe98df..393ec532b 100755
--- a/perl-install/standalone/net_monitor
+++ b/perl-install/standalone/net_monitor
@@ -28,10 +28,12 @@ use common qw(:common :file :functional :system);
use strict;
use netconnect;
-my $default_intf;
+my ($connect, $default_intf);
init Gtk;
+my $in = vnew interactive('su');
$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;
($default_intf) = "@ARGV" =~ /--defaultintf (\w+)/;
+$connect = "@ARGV" =~ /--connect/;
my $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel;
$window1->signal_connect ( delete_event => sub { Gtk->exit(0); });
$window1->set_position(1);
@@ -61,7 +63,7 @@ gtkadd($window1,
),
0, gtksignal_connect(my $button_connect = new Gtk::Button(), clicked => \&connection),
0, new Gtk::HSeparator,
- 0, gtksignal_connect(new Gtk::Button(_("Close")), clicked => sub { Gtk->exit(0) })
+ 0, gtksignal_connect(my $button_close = new Gtk::Button(_("Close")), clicked => sub { Gtk->exit(0) })
)
),
0, my $statusbar = new Gtk::Statusbar
@@ -86,12 +88,14 @@ my ($labelr, $labelt);
my $time_tag = Gtk->timeout_add(1000, \&rescan);
my $time_tag2 = Gtk->timeout_add(5000, \&update);
rescan();
+connection() if $connect && ! $isconnected;
Gtk->main;
Gtk->exit(0);
sub connection {
my $isconnected2 = $isconnected;
$button_connect->set_sensitive(0);
+ $button_close->set_sensitive(0);
$statusbar->pop(1);
$statusbar->push(1, $isconnected2 ? _("Disconnecting from internet ") : _("Connecting to internet "));
my $nb_point=1;
@@ -119,6 +123,7 @@ sub connection {
0;
});
$button_connect->set_sensitive(1);
+ $button_close->set_sensitive(1);
0;
});
Gtk->main_iteration while Gtk->events_pending;