Ok, I can reproduce it. Noticed that the environment when running the script gets reduced to:
UPSTART_INSTANCE= UPSTART_JOB=test TERM=linux PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin PWD=/
and that's not sufficient to run locale-gen.
Why on earth do you want to re-generate all locales at boot?
Ok, I can reproduce it. Noticed that the environment when running the script gets reduced to:
UPSTART_INSTANCE= local/sbin: /usr/local/ bin:/usr/ bin:/usr/ sbin:/sbin: /bin
UPSTART_JOB=test
TERM=linux
PATH=/usr/
PWD=/
and that's not sufficient to run locale-gen.
Why on earth do you want to re-generate all locales at boot?