summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-04-03 14:23:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-04-03 14:23:31 +0000
commit4ad0308a646d6d6ff38d1f8410e3ae43e0b9cabb (patch)
tree0fbde1c8c2615138dbef59381c79615379342c20 /perl-install/keyboard.pm
parent08f4b5bf2f57dc0d75dcde2cec410a16e1f65f20 (diff)
downloaddrakx-backup-do-not-use-4ad0308a646d6d6ff38d1f8410e3ae43e0b9cabb.tar
drakx-backup-do-not-use-4ad0308a646d6d6ff38d1f8410e3ae43e0b9cabb.tar.gz
drakx-backup-do-not-use-4ad0308a646d6d6ff38d1f8410e3ae43e0b9cabb.tar.bz2
drakx-backup-do-not-use-4ad0308a646d6d6ff38d1f8410e3ae43e0b9cabb.tar.xz
drakx-backup-do-not-use-4ad0308a646d6d6ff38d1f8410e3ae43e0b9cabb.zip
no_comment
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r--perl-install/keyboard.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 7cb5418d7..5e905aa2c 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -180,6 +180,7 @@ sub lang2keyboard($) {
sub load($) {
my ($keymap) = @_;
+ return if $::testing;
my ($magic, @keymaps) = unpack "I i" . c::MAX_NR_KEYMAPS() . "a*", $keymap;
$keymap = pop @keymaps;
@@ -209,9 +210,9 @@ sub load($) {
sub xmodmap_file {
my ($keyboard) = @_;
- my $f = "/usr/share/xmodmap/xmodmap.$keyboard";
+ my $f = "$ENV{SHARE_PATH}/xmodmap/xmodmap.$keyboard";
if (! -e $f) {
- run_program::run("extract_archive", "/usr/share/xmodmap.cz2", '/tmp', "xmodmap.$keyboard");
+ run_program::run("extract_archive", "$ENV{SHARE_PATH}/xmodmap.cz2", '/tmp', "xmodmap.$keyboard");
$f = "/tmp/xmodmap.$keyboard";
}
-e $f && $f;
@@ -222,11 +223,11 @@ sub setup($) {
my $o = $keyboards{$keyboard} or return;
log::l("loading keymap $o->[1]");
- if (-e (my $f = "/usr/share/keymaps/$o->[1].kmap")) {
+ if (-e (my $f = "$ENV{SHARE_PATH}/keymaps/$o->[1].kmap")) {
load(cat_($f));
} else {
local *F;
- open F, "extract_archive /usr/share/keymaps.cz2 '' $o->[1].kmap |";
+ open F, "extract_archive $ENV{SHARE_PATH}/keymaps.cz2 '' $o->[1].kmap |";
local $/ = undef;
eval { load(<F>) };
}