summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-06-15 13:55:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-06-15 13:55:01 +0000
commit0063ef098cf9f2f0eb5fe31451d2efac580d2550 (patch)
tree9203bcae52ca0ea235cf8cc535b585ca6a3cc197
parent1e5c90808141fa07c4f547c835dadc16b308c592 (diff)
downloaddrakx-0063ef098cf9f2f0eb5fe31451d2efac580d2550.tar
drakx-0063ef098cf9f2f0eb5fe31451d2efac580d2550.tar.gz
drakx-0063ef098cf9f2f0eb5fe31451d2efac580d2550.tar.bz2
drakx-0063ef098cf9f2f0eb5fe31451d2efac580d2550.tar.xz
drakx-0063ef098cf9f2f0eb5fe31451d2efac580d2550.zip
the presence of loadkeys doesn't mean it is the regular one. (fixes loadkeys calling itself)
-rw-r--r--perl-install/keyboard.pm13
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 4981dc861..8b066d302 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -500,21 +500,24 @@ sub setup {
my $kmap = keyboard2kmap($keyboard) or return;
log::l("loading keymap $kmap");
- if (-x '/bin/loadkeys') {
- run_program::run('loadkeys', $kmap);
- } elsif (-e (my $f = "$ENV{SHARE_PATH}/keymaps/$kmap.bkmap")) {
+ if (-e (my $f = "$ENV{SHARE_PATH}/keymaps/$kmap.bkmap")) {
load(scalar cat_($f));
- } else {
+ } elsif (-e (my $packed_kmaps = "$ENV{SHARE_PATH}/keymaps.cz2")) {
my $kid = bg_command->new(sub {
eval {
require packdrake;
- my $packer = new packdrake("$ENV{SHARE_PATH}/keymaps.cz2", quiet => 1);
+ my $packer = new packdrake($packed_kmaps, quiet => 1);
$packer->extract_archive(undef, "$kmap.bkmap");
};
});
local $/ = undef;
eval { my $fd = $kid->{fd}; load(join('', <$fd>)) };
+ } elsif (-x '/bin/loadkeys') {
+ run_program::run('loadkeys', $kmap);
+ } else {
+ log::l("ERROR: can't load keymap");
}
+
if (-x "/usr/X11R6/bin/setxkbmap") {
setxkbmap($keyboard);
} else {