summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-24 22:25:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-24 22:25:35 +0000
commite7eb06f7d9d04ab7f20a9da46c6af34a346cfa96 (patch)
treec2208feab294baeb78bf9ea4bf5fdde239c03cc7
parentb2e794d733c54ac59f9e15220746099bd2e7e2fc (diff)
downloaddrakx-e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96.tar
drakx-e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96.tar.gz
drakx-e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96.tar.bz2
drakx-e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96.tar.xz
drakx-e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96.zip
use Xconfig::xfree to set the XkbLayout (better should&will come)
-rwxr-xr-xperl-install/standalone/keyboarddrake27
1 files changed, 8 insertions, 19 deletions
diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake
index 0ac98cb49..1160fe758 100755
--- a/perl-install/standalone/keyboarddrake
+++ b/perl-install/standalone/keyboarddrake
@@ -6,7 +6,7 @@ use standalone; #- warning, standalone must be loaded very first, for 'expla
use interactive;
use keyboard;
-use Xconfigurator_consts;
+use Xconfig::xfree;
use common;
use c;
@@ -41,24 +41,13 @@ if ($keyboard) {
my $xkb = keyboard::keyboard2xkb($keyboard);
system('setxkbmap', $xkb);
- my $f = "/etc/X11/XF86Config";
- my $g = "/etc/X11/XF86Config-4";
-
- substInFile {
- if (/^Section\s+"Keyboard"/ .. /^EndSection/) {
- s|^(\s*XkbLayout\s+).*|$1"$xkb"|
- and $_ .= join '', map { " $_\n" } @{$Xconfigurator::xkb_options{$xkb} || []};
- $_ = '' if m,^(\s*(XkbVariant|XkbOptions)\s+),; # remove existing one
- }
- } $f if -e $f && !$::testing;
-
- substInFile {
- if (/Identifier\s+"Keyboard1"/ .. /^EndSection/) {
- s|^(\s*Option\s+"XkbLayout"\s+).*|$1"$xkb"|
- and $_ .= join '', map { /(\S+)(.*)/; qq( Option "$1" $2\n) } @{$Xconfigurator::xkb_options{$xkb} || []};
- $_ = '' if m,^(\s*Option\s+"(XkbVariant|XkbOptions)"\s+),; # remove existing one
- }
- } $g if -e $g && !$::testing;
+ eval {
+ my $xfree_conf = Xconfig::xfree->read;
+ my $x_kbd_conf = $xfree_conf->get_keyboard;
+ $x_kbd_conf->{XkbLayout} = $xkb;
+ $xfree_conf->set_keyboard($x_kbd_conf);
+ $xfree_conf->write;
+ };
keyboard::write('', $keyboard, $isNotDelete);
}