diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-02-12 15:02:11 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-02-12 15:02:11 +0000 |
commit | bdd9640e07024fc400b7127053f1753aff7677b1 (patch) | |
tree | 2cb1b7482133d7a65b93abc70c90b125231ef70a /perl-install/network | |
parent | 5bf3b825156cce1235b524a55cd2a581108d4954 (diff) | |
download | drakx-bdd9640e07024fc400b7127053f1753aff7677b1.tar drakx-bdd9640e07024fc400b7127053f1753aff7677b1.tar.gz drakx-bdd9640e07024fc400b7127053f1753aff7677b1.tar.bz2 drakx-bdd9640e07024fc400b7127053f1753aff7677b1.tar.xz drakx-bdd9640e07024fc400b7127053f1753aff7677b1.zip |
fix step linking with ask_connect_now and restart steps:
- fix check for restart step
- only offer to connect now for ppp connections
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/netconnect.pm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 4ae9924f9..8c7ae8e1f 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -151,6 +151,12 @@ sub get_subwizard { $module = $dev->[1]; } else { $module = "" } }; + + my $offer_to_connect = sub { + return "ask_connect_now" if $netc->{internet_cnx_choice} eq 'adsl' && $adsl_devices{$ntf_name}; + return "ask_connect_now" if member($netc->{internet_cnx_choice}, qw(modem isdn)); + return "end"; + }; my %adsl_devices = ( speedtouch => N("Alcatel speedtouch USB modem"), @@ -1065,14 +1071,14 @@ You may also enter the IP address of the gateway if you have one."), network::network::configureNetwork2($in, $::prefix, $netc, $intf); $network_configured = 1; - $::isInstall ? "restart" : "ask_connect_now"; + return "restart" if $netconnect::need_restart_network && $::isStandalone && !$::expert; + return $offer_to_connect->(); }, }, restart => { - # FIXME: condition is "if ($netconnect::need_restart_network && $::isStandalone && (!$::expert || $in->ask_yesorno(..." - name => N("The network needs to be restarted. Do you want to restart it ?"), + name => N("The network needs to be restarted. Do you want to restart it ?"), # data => [ { label => N("Connection:"), val => \$type, type => 'list', list => [ sort values %l ] }, ], post => sub { if (!$::testing && !run_program::rooted($::prefix, "/etc/rc.d/init.d/network restart")) { @@ -1081,7 +1087,7 @@ You may also enter the IP address of the gateway if you have one."), N("A problem occured while restarting the network: \n\n%s", `/etc/rc.d/init.d/network restart`), 0); } write_initscript(); - return $::isStandalone && member($netc->{internet_cnx_choice}, qw(modem adsl isdn)) ? "ask_connect_now" : "end"; + return $offer_to_connect->(); }, }, |