summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-04-12 08:19:45 +0000
committerdamien <damien@mandriva.com>2001-04-12 08:19:45 +0000
commit7ac401f247fda28ae9d03b8b507046566c43b513 (patch)
treecf003a18f3db34c09666cc7cf04c5f04b09a976e
parent22941f0c1eee02b84675f6ac0e62f4c2ba07c062 (diff)
downloaddrakx-7ac401f247fda28ae9d03b8b507046566c43b513.tar
drakx-7ac401f247fda28ae9d03b8b507046566c43b513.tar.gz
drakx-7ac401f247fda28ae9d03b8b507046566c43b513.tar.bz2
drakx-7ac401f247fda28ae9d03b8b507046566c43b513.tar.xz
drakx-7ac401f247fda28ae9d03b8b507046566c43b513.zip
corrected network connection
-rw-r--r--perl-install/network.pm3
-rwxr-xr-xperl-install/standalone/draknet47
2 files changed, 31 insertions, 19 deletions
diff --git a/perl-install/network.pm b/perl-install/network.pm
index a1350dd8a..174692d4d 100644
--- a/perl-install/network.pm
+++ b/perl-install/network.pm
@@ -189,7 +189,8 @@ sub dnsServers {
sub findIntf {
my ($intf, $device) = @_;
- $intf->{$device} ||= { DEVICE => $device };
+ $intf->{$device}->{DEVICE} = $device;
+ $intf->{$device};
}
#PAD \s* a la fin
my $ip_regexp = qr/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet
index 27a388548..f8f676dec 100755
--- a/perl-install/standalone/draknet
+++ b/perl-install/standalone/draknet
@@ -170,27 +170,38 @@ $table1->attach($label8, 1, 2, 2, 3, 'fill', 'fill',0,0);
my $button2 = new Gtk::Button($c ? _("Disconnect...") : _("Connect..."));
$button2->signal_connect (clicked => sub {
- $::isWizard = 0;
+ my $dialog = new Gtk::Dialog();
+ $dialog->set_position(1);
+ $dialog->vbox->set_border_width(10);
+ $dialog->vbox->pack_start(my $l = new Gtk::Label(""),1,1,0);
+ my $bbox_dialog = new Gtk::HButtonBox;
+ $dialog->action_area->add($bbox_dialog);
+ $bbox_dialog->set_layout(-end);
+ my $button_ok = new Gtk::Button _("OK");
+ $button_ok->signal_connect ( clicked => sub { Gtk->main_quit(); });
+ $button_ok->set_sensitive(0);
+ $bbox_dialog->add($button_ok );
+ $dialog->show_all;
+ $dialog->set_modal(1);
if (!netconnect::connected('', $netc)) {
- my $up;
- {
- my $w = $in->wait_message('', _("Opening your connection..."), 1);
- netconnect::connect_backend($prefix);
- sleep 5;
- $up=netconnect::connected($prefix, $netc);
- }
- $in->ask_warn('', $up ? _("The system is now connected to Internet.") : _("The system doesn't seem to be connected to internet.
-Try to reconfigure your connection.") );
+ $l->set(_("Starting your connection..."));
+ Gtk->main_iteration while Gtk->events_pending;
+ netconnect::connect_backend($prefix);
+ sleep 5;
+ my $up=netconnect::connected($prefix, $netc);
+ $l->set($up ? _("The system is now connected to Internet.") : _("The system doesn't seem to be connected to internet.
+Try to reconfigure your connection."));
} else {
- my $up;
- {
- my $w = $in->wait_message('', _("Closing your connection..."), 1);
- netconnect::disconnect_backend($prefix);
- sleep 5;
- $up=netconnect::connected($prefix, $netc);
- }
- $in->ask_warn('', $up ? _("The connection is not closed. Try to do it manually by running /etc/sysconfig/network-scripts/net_cnx_down in root.") : _("The system is now disconnected.") );
+ $l->set(_("Closing your connection..."));
+ Gtk->main_iteration while Gtk->events_pending;
+ netconnect::disconnect_backend($prefix);
+ sleep 5;
+ my $up=netconnect::connected($prefix, $netc);
+ $l->set($up ? _("The connection is not closed. Try to do it manually by running /etc/sysconfig/network-scripts/net_cnx_down in root.") : _("The system is now disconnected.") );
}
+ $button_ok->set_sensitive(1);
+ Gtk->main();
+ $dialog->destroy;
update();
});
$table1->attach($button2, 2, 3, 2, 3, 'fill', 'fill',0,0);