Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
kiwi-config-openSUSE
langset.pl
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File langset.pl of Package kiwi-config-openSUSE
#!/usr/bin/perl $Lang=""; $Terr=""; open(CMDL, "</proc/cmdline" ); while (<CMDL>) { if (m,lang=([a-z][a-z])([_@][\w@]+)?,) { $Lang=$1; $Terr=$2; last; } } close CMDL; my %values = (); if (open(CONF, "</etc/langset/$Lang$Terr" ) || open(CONF, "</etc/langset/$Lang" )) { while (<CONF>) { if ( /^([A-Z_]*): (.*)$/ ) { $values{$1} = $2; } } close CONF; } foreach $key (keys %values) { $value = $values{$key}; next if ($value eq ""); system("sed -i -e 's#$key=\".*#$key=\"$value\"#' /etc/sysconfig/language"); system("sed -i -e 's#$key=\".*#$key=\"$value\"#' /etc/sysconfig/keyboard"); system("sed -i -e 's#$key=\".*#$key=\"$value\"#' /etc/sysconfig/console"); } open(FH, ">/etc/langset.xkb"); print FH $values{"XkbLayout"} . "\n"; print FH $values{"XkbModel"} . "\n"; print FH $values{"XkbOptions"} . "\n"; print FH $values{"XkbVariant"} . "\n"; close(FH);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor