2 # Filename: /etc/grml/fai/config/scripts/GRMLBASE/25-locales
3 # Purpose: locales (language) configuration of the live system
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2 or any later version.
7 ################################################################################
11 if [ -z "$ROOTCMD" ] ; then
12 echo "variable \$ROOTCMD not set, exiting to avoid any possible damage">&2
16 # use full locales setup only in classes GRML_FULL and LOCALES
17 if ifclass GRML_FULL || ifclass LOCALES ; then
18 echo 'Using /etc/locale.gen.grml for locales generation'
19 cp $target/etc/locale.gen.grml $target/etc/locale.gen
21 echo 'Using /etc/locale.gen.minimal for locales generation'
22 cp $target/etc/locale.gen.minimal $target/etc/locale.gen
26 # localepurge localepurge/nopurge multiselect ....
27 # is set so localepurge works as expected
28 if [ -x $target/usr/sbin/localepurge ] ; then
29 $ROOTCMD dpkg-reconfigure -f noninteractive localepurge
32 if [ -x $target/usr/sbin/locale-gen ] ; then
35 echo 'Warning: locale-gen [package locales] not available'
38 if [ -x $target/usr/sbin/localepurge ] ; then
42 # get rid of LC_MESSAGES unless using class LOCALES
43 if ! ifclass LOCALES ; then
44 echo 'Removing /usr/share/locale'
45 $ROOTCMD rm -rf /usr/share/locale
46 $ROOTCMD mkdir /usr/share/locale
47 # TODO: /usr/share/i18n/locales
50 ## END OF FILE #################################################################
51 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3