Re: Best way to generate locales on CDD
On Wed, Oct 17, 2007 at 07:30:42AM -0400, Ernesto Hernandez-Novich wrote:
> The CDD I'm working on must support several locales after installation.
> Package locales is being included in the package list. I've preseeded it
> using
>
> locales locales/default_environment_locale select
> es_ES.UTF-8
> locales locales/locales_to_be_generated multiselect \
> en_US.UTF-8 UTF-8, es_ES.UTF-8 UTF-8, es_VE.UTF-8 UTF-8
possibly debian-installer is overwriting the locale information? i don't
know...
> however, the locales are _not_ being generated. After the install
> finishes, I have to _manually_ fix /etc/locale.gen and then run
> locale-gen for these locales to be properly generated. Is there a
> different way of doing this?
>
> Maybe adding
>
> d-i preseed/late_command in-target locale-gen
>
> could help, but /etc/locale.gen must have the right contents...
if you're using simple-cdd, you could add a profiles/NAME.postinst to
handle whatever modifications you need. it gets copied into the
installed environment late in the process, so you could modify
/etc/locale.gen and then run locale-gen, something like:
#!/bin/sh
locales="en_US es_ES es_VE"
mv /etc/locale.gen /etc/locale.gen.old
for l in $locales ; do
echo ${l}.UTF-8 UTF-8 >> /etc/locale.gen
done
locale-gen
###
ideally, you could just use preseeding, though...
live well,
vagrant
Reply to: