From 0063ef098cf9f2f0eb5fe31451d2efac580d2550 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 15 Jun 2004 13:55:01 +0000 Subject: the presence of loadkeys doesn't mean it is the regular one. (fixes loadkeys calling itself) --- perl-install/keyboard.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'perl-install') 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 { -- cgit v1.2.1