summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-08-18 08:30:38 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-08-18 08:30:38 +0000
commit5b5f63e4b5b0cdeddec96901863c7c387bed26ce (patch)
tree9144ab223d4d765260f7bee864bd3c6f9b995d8d /perl-install
parent419abdd72f1e422906224dc36a4379eab0c2c417 (diff)
downloaddrakx-backup-do-not-use-5b5f63e4b5b0cdeddec96901863c7c387bed26ce.tar
drakx-backup-do-not-use-5b5f63e4b5b0cdeddec96901863c7c387bed26ce.tar.gz
drakx-backup-do-not-use-5b5f63e4b5b0cdeddec96901863c7c387bed26ce.tar.bz2
drakx-backup-do-not-use-5b5f63e4b5b0cdeddec96901863c7c387bed26ce.tar.xz
drakx-backup-do-not-use-5b5f63e4b5b0cdeddec96901863c7c387bed26ce.zip
fix some previous callback in drakconnect wizard mode
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/isdn.pm13
-rw-r--r--perl-install/network/modem.pm6
-rw-r--r--perl-install/network/netconnect.pm2
3 files changed, 13 insertions, 8 deletions
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index 1a3f0e5fb..0b4449781 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -30,7 +30,7 @@ sub configure {
$netc->{isdntype} = 'isdn_internal';
$netcnx->{isdn_internal}{$_} = $netc->{autodetect}{isdn}{$_} foreach 'description', 'vendor', 'id', 'driver', 'card_type', 'type';
$netcnx->{isdn_internal} = isdn_read_config($netcnx->{isdn_internal});
- isdn_detect($netcnx->{isdn_internal}, $netc) or return;
+ isdn_detect($netcnx->{isdn_internal}, $netc) or goto isdn_step_1;
} else {
$netc->{isdntype} = 'isdn_external';
$netcnx->{isdn_external}{device} = $netc->{autodetect}{modem};
@@ -148,6 +148,7 @@ sub isdn_ask_info {
my ($isdn, $netc) = @_;
my $f = "$ENV{SHARE_PATH}/ldetect-lst/isdn.db";
$f = "$prefix$f" if !-e $f;
+ isdn_ask_info_step1:
my $str = $in->ask_from_treelist(N("ISDN Configuration"), N("Select your provider.\nIf it isn't listed, choose Unlisted."),
'|', ['Unlisted - edit manually',
read_providers_backend($f)], 'Unlisted - edit manually')
@@ -156,7 +157,7 @@ sub isdn_ask_info {
$isdn->{huptimeout} = 180;
$isdn->{$_} ||= '' foreach qw(phone_in phone_out dialing_mode login passwd passwd2 idl speed);
add2hash($netc, { dnsServer2 => '', dnsServer3 => '', DOMAINNAME2 => '' });
- ask_info2($isdn, $netc);
+ ask_info2($isdn, $netc) or goto isdn_ask_info_step1;
}
sub isdn_ask_protocol() {
@@ -188,6 +189,7 @@ sub isdn_ask {
$label . "\n" . N("What kind of card do you have?"),
[ N_("ISA / PCMCIA"), N_("PCI"), N_("I don't know") ]
) or return;
+ isdn_ask_step_1b:
if ($e =~ /PCI/) {
$isdn->{card_type} = 'pci';
} else {
@@ -204,7 +206,7 @@ If you have a PCMCIA card, you have to know the \"irq\" and \"io\" of your card.
$e = $in->ask_from_listf(N("ISDN Configuration"),
N("Which of the following is your ISDN card?"),
sub { $_[0]{description} },
- [ grep { $_->{card} eq $isdn->{card_type} } @isdndata ]) or goto isdn_ask_step_1;
+ [ grep { $_->{card} eq $isdn->{card_type} } @isdndata ]) or goto isdn_ask_step_1b;
$e->{$_} and $isdn->{$_} = $e->{$_} foreach qw(driver type mem io io0 io1 irq firmware);
isdn_ask_step_3:
@@ -221,13 +223,14 @@ sub isdn_detect {
log::l("found isdn card : $isdn->{description}; vendor : $isdn->{vendor}; id : $isdn->{id}; driver : $isdn->{driver}\n");
$isdn->{description} =~ s/\|/ -- /;
+ isdn_detect_step_0:
defined $isdn->{type} and my $new = $in->ask_yesorno(N("ISDN Configuration"), N("Do you want to start a new configuration ?"), 1);
if ($isdn->{type} eq '' || $new) {
- isdn_ask($isdn, $netc, N("I have detected an ISDN PCI card, but I don't know its type. Please select a PCI card on the next screen.")) or return;
+ isdn_ask($isdn, $netc, N("I have detected an ISDN PCI card, but I don't know its type. Please select a PCI card on the next screen.")) or goto isdn_detect_step_0;
} else {
isdn_detect_step_1:
- $isdn->{protocol} = isdn_ask_protocol() or return;
+ $isdn->{protocol} = isdn_ask_protocol() or goto isdn_detect_step_0;
isdn_detect_step_2:
isdn_ask_info($isdn, $netc) or goto isdn_detect_step_1;
isdn_write_config($isdn, $netc) or goto isdn_detect_step_2;
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm
index 365f73d48..e7e1b509d 100644
--- a/perl-install/network/modem.pm
+++ b/perl-install/network/modem.pm
@@ -215,7 +215,9 @@ sub ppp_choose {
$o_mouse ||= {};
$o_mouse->{device} ||= readlink "$::prefix/dev/mouse";
- $modem->{device} ||= $in->ask_from_listf_raw({ messsages => N("Please choose which serial port your modem is connected to."),
+ my $need_to_ask = $modem->{device};
+ step_1:
+ $need_to_ask and $modem->{device} = $in->ask_from_listf_raw({ messsages => N("Please choose which serial port your modem is connected to."),
interactive_help_id => 'selectSerialPort',
},
\&mouse::serial_port2text,
@@ -232,7 +234,7 @@ sub ppp_choose {
{ label => N("Domain name"), val => \$modem->{domain} },
{ label => N("First DNS Server (optional)"), val => \$modem->{dns1} },
{ label => N("Second DNS Server (optional)"), val => \$modem->{dns2} },
- ]) or return;
+ ]) or do { if ($need_to_ask) { goto step_1 } else { return } };
$netc->{DOMAINNAME2} = $modem->{domain};
ppp_configure($in, $modem);
$netc->{$_} = 'ppp0' foreach 'NET_DEVICE', 'NET_INTERFACE';
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index f59846571..3b4354f95 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -176,7 +176,7 @@ If you don't want to use the auto detection, deselect the checkbox.
$netc->{internet_cnx_choice} = (keys %{$netc->{internet_cnx}})[0];
}
- eval { $in->ask_yesorno(N("Network configuration"), N("Configuration is complete, do you want to apply settings ?"), 1) or goto step_2_2 };
+ eval { my ($r) = $in->ask_yesorno(N("Network configuration"), N("Configuration is complete, do you want to apply settings ?"), 1) or goto step_2_2 };
$in->exit(0) if $@ =~ /wizcancel/;
member($netc->{internet_cnx_choice}, ('adsl', 'isdn')) and $netc->{at_boot} = $in->ask_yesorno(N("Network Configuration Wizard"), N("Do you want to start the connection at boot?"));