OpenRC: merge some local changes.
* Move all patches to xbps-changes.diff. * Provide /etc/conf.d/locale and set "en_US" by default. * Move rc.conf to /etc/default/rc.conf. Set unicode, rc_shell and rc_logger by default. * Explain in keymaps that keyboard layout must also be specified, like "qwerty/es"; otherwise lodkeys will fail to use the correct keymap if there exists duplicate keymaps with the same name. Bump revision. --HG-- extra : convert_revision : 0b99d27c67cb0d7d055e769bb9a0c6b640adfe87
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
: ${system_locale:=en_US}
|
||||
description="Sets a system locale"
|
||||
|
||||
depend()
|
||||
@@ -13,16 +14,15 @@ start()
|
||||
{
|
||||
: >/etc/profile.d/locale.sh
|
||||
chmod 755 /etc/profile.d/locale.sh
|
||||
[ -z "$LOCALE" ] && LOCALE="en_US"
|
||||
|
||||
# Check if requested locale was already created
|
||||
if ! $(locale -a|grep -q $LOCALE.utf8); then
|
||||
if ! $(locale -a|grep -q "${system_locale}.utf8"); then
|
||||
[ ! -d /usr/lib/locale ] && mkdir -p /usr/lib/locale
|
||||
ebegin "Building locale [$LOCALE] [UTF-8]"
|
||||
localedef -i $LOCALE -f UTF-8 $LOCALE
|
||||
ebegin "Building locale [${system_locale}] [UTF-8]"
|
||||
localedef -i ${system_locale} -f UTF-8 ${system_locale}
|
||||
eend $?
|
||||
fi
|
||||
# Set user defined locale
|
||||
einfo "Setting system locale [$LOCALE] [UTF-8]"
|
||||
echo "export LANG=$LOCALE.UTF-8" >> /etc/profile.d/locale.sh
|
||||
einfo "Setting system locale [${system_locale}] [UTF-8]"
|
||||
echo "export LANG=${system_locale}.UTF-8" >> /etc/profile.d/locale.sh
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user