diff options
-rw-r--r-- | perl-install/network.pm | 3 | ||||
-rwxr-xr-x | perl-install/standalone/draknet | 47 |
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); |