From 28e12dd540cdc89f93b6a2cc1e0dacfbec120ba6 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 15 Sep 2005 11:03:39 +0000 Subject: since choosing keyboard is done after mounting partition to upgrade, we can do things much more nicely on upgrade: - keeping previous keyboard - or forcing prompting keyboard when bad keyboard --- perl-install/install2.pm | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'perl-install/install2.pm') diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 259dc1e3b..599e7ffb7 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -122,18 +122,15 @@ sub setupSCSI { sub selectKeyboard { my ($auto) = @_; - installStepsCall($o, $auto, 'selectKeyboard'); - - #- read keyboard ASAP (so that summary displays ok) - addToBeDone { - $o->{keyboard}{unsafe} or return; - if (my $keyboard = keyboard::read()) { - $o->{keyboard} = $keyboard; - } elsif ($o->{isUpgrade}) { - #- oops, the keyboard config is wrong, writing the unsafe config - addToBeDone { keyboard::write($o->{keyboard}) } 'installPackages'; - } - } 'formatPartitions'; + my $force; + if (my $keyboard = keyboard::read()) { + $o->{keyboard} = $keyboard; #- for uprade + } elsif ($o->{isUpgrade}) { + #- oops, the keyboard config is wrong, forcing prompt and writing + $force = 1; + } + + installStepsCall($o, $auto, 'selectKeyboard', $force); } #------------------------------------------------------------------------------ -- cgit v1.2.1