Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lafenghu
kiwi-config-openSUSE
langset.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File langset.sh of Package kiwi-config-openSUSE
#!/bin/sh lang=en_US for o in $(cat /proc/cmdline); do case $o in lang=*) eval $o ;; esac done # we need the _NOT so there is always a field 2 Country=$(echo "$lang"_NOT | cut -d_ -f2) Language=$(echo "$lang" | cut -d_ -f1) file="/etc/langset/$Language""_$Country" if ! test -f "$file"; then file="/etc/langset/$Language" fi sed -e 's,: *,:,' "$file" | while read line; do key=`echo $line | cut -d: -f1` value=`echo $line | cut -d: -f2-` sed -i -e "s#$key=\".*#$key=\"$value\"#" /etc/sysconfig/language sed -i -e "s#$key=\".*#$key=\"$value\"#" /etc/sysconfig/keyboard sed -i -e "s#$key=\".*#$key=\"$value\"#" /etc/sysconfig/console sed -i -e "s#$key=\".*#$key=\"$value\"#" /etc/sysconfig/clock done echo "$Language""_$Country" > /var/lib/zypp/RequestedLocales
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