Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

One of the basic steps in setting up a new system is getting the right glibc locale files generated. At least in ArchLinux and Gentoo, one is expected to do this step by hand. I am trying to setup a script that deploys ArchLinux. For various reasons, my script is limited by not knowing where in the config process it is and testing for each step as it goes along. The process includes several reboots.

Throwing the right locale into /etc/locale.gen and running local-gen every time doesn't seem to hurt, but on the embeded platform I'm using it takes a long time and running this several times really hurts.

What would be the proper way to test this -- not just that a locale is set in the config but that the proper files for it are generated?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

/usr/bin/locale -a prints the list of already generated locales found in /usr/lib/locale/locale-archive. (and the POSIX and C locale)

$ locale -a
C
POSIX
de_DE.utf8
en_US.utf8
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.