summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-04 22:13:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-04 22:13:57 +0000
commit85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc (patch)
tree3a45e1e56f50f9f59ea5d3db0be6b279ee0eb526 /perl-install/keyboard.pm
parentf7537f35d8002323124bbb8aa40b627152660bf3 (diff)
downloaddrakx-backup-do-not-use-85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc.tar
drakx-backup-do-not-use-85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc.tar.gz
drakx-backup-do-not-use-85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc.tar.bz2
drakx-backup-do-not-use-85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc.tar.xz
drakx-backup-do-not-use-85e21d9abb2daf68be31c33dcdbc8874c3cc8fdc.zip
no_comment
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r--perl-install/keyboard.pm21
1 files changed, 15 insertions, 6 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 0190668af..5d02fdb67 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -179,20 +179,29 @@ sub load($) {
}
$count++;
}
- log::l("loaded $count keymap tables");
+ #- log::l("loaded $count keymap tables");
}
sub setup($) {
my ($keyboard) = @_;
my $o = $keyboards{$keyboard} or return;
- if (my $file = commands::install_cpio("/usr/share/keymaps", "$o->[1].kmap")) {
- log::l("loading keymap $o->[1]");
- load(cat_($file)) if -e $file;
+ log::l("loading keymap $o->[1]");
+ if (-e (my $f = "/usr/share/keymaps/$o->[1].kmap")) {
+ load(cat_($f));
+ } else {
+ local *F;
+ open F, "extract_archive /usr/share/keymaps '' $o->[1].kmap |";
+ local $/ = undef;
+ eval { load(<F>) };
}
- if (my $file = commands::install_cpio("/usr/share/xmodmap", "xmodmap.$keyboard")) {
- eval { run_program::run('xmodmap', $file) } unless $::testing;
+
+ my $f = "/usr/share/xmodmap/xmodmap.$keyboard";
+ if (! -e $f) {
+ run_program::run("extract_archive", "/usr/share/xmodmap", '/tmp', "xmodmap.$keyboard");
+ $f = "/tmp/xmodmap.$keyboard";
}
+ eval { run_program::run('xmodmap', $f) } unless $::testing;
}
sub write($$;$) {