Setting global job environment

Martin Jackson mjackson220.list at
Fri Nov 20 14:03:52 GMT 2009


I would like to set up upstart 0.6.3 so that LANG=en_US.utf8 appears
in the environment of all jobs that are started, on an embedded
system, as a reasonably sane default locale that supports UTF8. We are
using the busybox shell, ash.

AFAIK, all jobs are started in a shell from upstart. However, this is
not a login shell, so I cannot just export LANG in my /etc/profile.

What is the best way to acheive this?

I believe that I have the following options:
* hack the upstart source to change the JOB_DEFAULT_ENVIRONMENT to include LANG
* add some export to every job (not keen on this option)
* set the shell up to always read a configuration file on startup (likewise)

Thanks in advance,

Martin Jackson

More information about the upstart-devel mailing list