summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-19 14:49:36 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-19 14:49:36 +0000
commit4710960f1314ec790ea876f0e50250cac59e089c (patch)
treeebf7ffacad519615bc779e28e108af7fff27d14b /perl-install/keyboard.pm
parentbb1b2617bc36e258f13d375faaaec1bfff97080e (diff)
downloaddrakx-backup-do-not-use-4710960f1314ec790ea876f0e50250cac59e089c.tar
drakx-backup-do-not-use-4710960f1314ec790ea876f0e50250cac59e089c.tar.gz
drakx-backup-do-not-use-4710960f1314ec790ea876f0e50250cac59e089c.tar.bz2
drakx-backup-do-not-use-4710960f1314ec790ea876f0e50250cac59e089c.tar.xz
drakx-backup-do-not-use-4710960f1314ec790ea876f0e50250cac59e089c.zip
no_comment
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r--perl-install/keyboard.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 44a9fc32a..5f2ee9b14 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -79,6 +79,11 @@ sub text2keyboard {
die "unknown keyboard $t";
}
+sub kmap($) {
+ my ($keyboard) = @_;
+ ($keyboards{$keyboard} || [])->[1];
+}
+
sub lang2keyboard($) {
local ($_) = @_;
$keyboards{$_} && $_ || $lang2keyboard{$_} || substr($_, 0, 2);
@@ -128,11 +133,8 @@ sub setup($) {
sub write($$) {
my ($prefix, $keyboard) = @_;
- my $o = $keyboards{$keyboard} or return;
- local *F;
- open F, ">$prefix/etc/sysconfig/keyboard" or die "failed to create keyboard configuration: $!";
- print F "KEYTABLE=$o->[1]\n" or die "failed to write keyboard configuration: $!";
+ setVarsInSh("$prefix/etc/sysconfig/keyboard", { KEYTABLE => kmap($keyboard) });
run_program::rooted($prefix, "dumpkeys > /etc/sysconfig/console/default.kmap") or die "dumpkeys failed";
}