Группа :: Система/Настройка/Прочее
Пакет: livecd-setlocale
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
livecd-setlocale/ 0000755 0000000 0000000 00000000000 11206516722 0014275 5 ustar 00root root 0000000 0000000 livecd-setlocale/livecd-setlocale 0000755 0000000 0000000 00000001627 11206516722 0017450 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()
{
in_locale=`grep -o 'lang=[^ ]*' /proc/cmdline`
if [ $in_locale ] ; then
in_locale=`echo $in_locale | cut -d = -f 2`
echo "setting locale to $in_locale"
kbmap=`alterator-cmdline /sysconfig-base/kbd action list language $in_locale -k name | head -n 1`
alterator-cmdline /sysconfig-base/kbd action write language "$in_locale" layout "$kbmap"
alterator-cmdline /sysconfig-base/language action write lang "$in_locale"
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop|condstop|status)
;;
restart|reload|condrestart|condreload)
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac
exit $RETVAL