diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-24 22:25:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-24 22:25:35 +0000 |
commit | e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96 (patch) | |
tree | c2208feab294baeb78bf9ea4bf5fdde239c03cc7 /perl-install/standalone | |
parent | b2e794d733c54ac59f9e15220746099bd2e7e2fc (diff) | |
download | drakx-backup-do-not-use-e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96.tar drakx-backup-do-not-use-e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96.tar.gz drakx-backup-do-not-use-e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96.tar.bz2 drakx-backup-do-not-use-e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96.tar.xz drakx-backup-do-not-use-e7eb06f7d9d04ab7f20a9da46c6af34a346cfa96.zip |
use Xconfig::xfree to set the XkbLayout (better should&will come)
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/keyboarddrake | 27 |
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); } |