summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r--perl-install/keyboard.pm14
1 files changed, 3 insertions, 11 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 77322e803..9309d1a98 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -140,18 +140,10 @@ sub write($$) {
}
sub read($) {
- my ($file) = @_;
+ my ($prefix) = @_;
- local *F;
- open F, "$file" or die "failed to read keyboard configuration";
-
- foreach (<F>) {
- ($_) = /^KEYTABLE=(.*)/ or log::l("unrecognized entry in keyboard configuration file ($_)"), next;
- s/^\s*"(.*)"\s*$/$1/;
- s/\.[^.]*//; #- remove extension
- return basename($_);
- }
- die "empty keyboard configuration file";
+ my %keyf = getVarsFromSh("$prefix/etc/sysconfig/keyboard");
+ map { kmap($_) eq $keyf{KEYTABLE} ? $_ : (); } keys %keyboards;
}
#-######################################################################################