diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-08-30 18:50:40 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-08-30 18:50:40 +0000 |
commit | 1defcba73b989b6a28826c563417a7c0fc251052 (patch) | |
tree | 1d5bff21637dc8fb4f21fb9846ef6175c045d3f5 /perl-install/install_steps_interactive.pm | |
parent | fb80b8a8984779543f0f0c50d7f6dcb995e0ce96 (diff) | |
download | drakx-backup-do-not-use-1defcba73b989b6a28826c563417a7c0fc251052.tar drakx-backup-do-not-use-1defcba73b989b6a28826c563417a7c0fc251052.tar.gz drakx-backup-do-not-use-1defcba73b989b6a28826c563417a7c0fc251052.tar.bz2 drakx-backup-do-not-use-1defcba73b989b6a28826c563417a7c0fc251052.tar.xz drakx-backup-do-not-use-1defcba73b989b6a28826c563417a7c0fc251052.zip |
no_comment
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r-- | perl-install/install_steps_interactive.pm | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 52bedcd81..126673c22 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -14,6 +14,7 @@ use detect_devices; use network; use modules; use lang; +use keyboard; use fs; use log; @@ -28,8 +29,17 @@ sub errorInStep($$) { sub chooseLanguage($) { my ($o) = @_; lang::text2lang($o->ask_from_list("Language", - __("Which language do you want?"), # the translation may be used for the help - [ lang::list() ], lang::lang2text($o->default("lang")))); + __("Which language do you want?"), # the translation may be used for the help + [ lang::list() ], + lang::lang2text($o->default("lang")))); +} + +sub chooseKeyboard($) { + my ($o) = @_; + keyboard::text2keyboard($o->ask_from_list_("Keyboard", + _("Which keyboard do you have?"), + [ keyboard::list() ], + keyboard::keyboard2text($o->default("keyboard")))); } sub selectInstallOrUpgrade($) { @@ -82,7 +92,7 @@ sub rebootNeeded($) { sub choosePartitionsToFormat($$) { my ($o, $fstab) = @_; - $o->SUPER::choosePartitionsToFormat($fstab) if $o->{steps}{$o->{step}}{entered} == 1; + $o->SUPER::choosePartitionsToFormat($fstab); my @l = grep { $_->{mntpoint} && isExt2($_) || isSwap($_) } @$fstab; my @r = $o->ask_many_from_list_ref('', _("Choose the partitions you want to format"), @@ -116,24 +126,42 @@ sub configureNetwork($) { $r = $o->ask_from_list_(_("Network Configuration"), _("LAN networking has already been configured. Do you want to:"), [ @l ]); - !$r || $r =~ /^Don't/ and return; + $r ||= "Don't"; } } else { $o->ask_yesorno(_("Network Configuration"), - _("Do you want to configure LAN (not dialup) networking for your installed system?")) or return; + _("Do you want to configure LAN (not dialup) networking for your installed system?")) or $r = "Don't"; } - if ($r !~ /^Keep/) { + if ($r =~ /^Don't/) { + $o->{netc}{NETWORKING} = "false"; + } elsif ($r !~ /^Keep/) { my @l = network::getNet() or return die _("no network card found"); @l = ($l[0]) unless $::expert; # keep only one - $o->configureNetworkIntf(network::findIntf($o->{intf}, $_)) foreach @l; + my $last; foreach (@l) { + my $intf = network::findIntf($o->{intf}, $_); + add2hash($intf, $last); + $o->configureNetworkIntf($intf); + $last = $intf; + } + { + my $wait = $o->wait_message(_("Hostname"), _("Determining host name and domain...")); + network::guessHostname($o->{prefix}, $o->{netc}, $o->{intf}); + } $o->configureNetworkNet($o->{netc} ||= {}); } $o->SUPER::configureNetwork; } +sub timeConfig { + my ($o, $f) = @_; + add2hash($o->{timezone} ||= {}, $o->default("timezone")); + $o->{timezone}{GMT} = $o->ask_yesorno('', _("Is your hardware clock set to GMT?"), $o->{timezone}{GMT}); + $o->{timezone}{timezone} = $o->ask_from_list('', _("In which timezone are you"), [ install_any::getTimeZones() ], $o->{timezone}{timezone}); + $o->SUPER::timeConfig($f); +} sub createBootdisk { my ($o, $first_time) = @_; |