Группа :: Система/Настройка/Прочее
Пакет: livecd-setlocale
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
livecd-setlocale/ 0000755 0000000 0000000 00000000000 10714354132 0014273 5 ustar 00root root 0000000 0000000 livecd-setlocale/livecd-setlocale 0000755 0000000 0000000 00000001477 10714354132 0017451 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
#
# chkconfig: 5 04 05
# description: This startup script sets locale from /proc/cmdline
WITHOUT_RC_COMPAT=1
# Source function library.
. /etc/init.d/functions
RETVAL=0
start()
{
echo "setting locale"
in_locale=`grep -o 'lang=[^ ]*' /proc/cmdline`
if [ $in_locale ] ; then
in_locale=`echo $in_locale | cut -d = -f 2`
echo $in_locale
subst "s/ru_RU/$in_locale/g" /etc/sysconfig/i18n
kbmap=`alterator-cmdline /syskbd action list language $in_locale | grep -o -m 1 'name "[a-z_]*"' | head -n 1 | sed -e 's/.*"\([a-z_]*\)"/\1/'`
alterator-cmdline /syskbd action write language $in_locale _objects $kbmap
fi
}
stop()
{
true
}
restart()
{
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
*)
msg_usage "${0##*/} {start|stop}"
RETVAL=1
esac
exit $RETVAL