diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-02-20 16:46:44 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-02-20 16:46:44 +0000 |
commit | 6649f7e8b8036b15ef44587b0fb276ec3a0f6041 (patch) | |
tree | a2513f04a2f38374e7142fb02d34cba3c6f8c7ba /perl-install | |
parent | 7eaf79a6c404ffe245a666ad2bf3a4ad479922a2 (diff) | |
download | drakx-6649f7e8b8036b15ef44587b0fb276ec3a0f6041.tar drakx-6649f7e8b8036b15ef44587b0fb276ec3a0f6041.tar.gz drakx-6649f7e8b8036b15ef44587b0fb276ec3a0f6041.tar.bz2 drakx-6649f7e8b8036b15ef44587b0fb276ec3a0f6041.tar.xz drakx-6649f7e8b8036b15ef44587b0fb276ec3a0f6041.zip |
do not horribly die at install time on error
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/network/netconnect.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index ea93ecbb2..a1c2d9ceb 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -73,7 +73,7 @@ sub get_subwizard { } # configuring all network devices - sub main { +sub real_main { my ($_prefix, $netcnx, $in, $o_netc, $o_mouse, $o_intf, $o_first_time, $o_noauto) = @_; my $netc = $o_netc ||= {}; my $mouse = $o_mouse ||= {}; @@ -1245,6 +1245,18 @@ fi } } +sub main { + my ($_prefix, $netcnx, $in, $o_netc, $o_mouse, $o_intf, $o_first_time, $o_noauto) = @_; + eval { real_main('', , $netcnx, $in, $o_netc, $o_mouse, $o_intf, $o_first_time, $o_noauto) }; + my $err = $@; + if ($err) { # && $in->isa('interactive::gtk') + local $::isEmbedded = 0; # to prevent sub window embedding + local $::isWizard = 0 if !$::isInstall; # to prevent sub window embedding + #err_dialog(N("Error"), N("An unexpected error has happened:\n%s", $err)); + $in->ask_warn(N("Error"), N("An unexpected error has happened:\n%s", $err)); + } +} + sub set_profile { my ($netcnx) = @_; system(qq(/sbin/set-netprofile "$netcnx->{PROFILE}")); |