saltstack/salt — pull request #5937 by elyast (2013-07-04 07:06:42+00:00)
Title: fixing issues with passing env var to salt-minion,master,syndic

Hi guys I have a problem with env variables (set in /etc/environment) as they are not passed when running salt-minion as a service (ubuntu)
I found that this post http://serverfault.com/questions/128605/have-upstart-read-environment-from-etc-environment-for-a-service and basically they advice to use exec su -c in upstart scripts, which pointed me to https://github.com/saltstack/salt/blob/develop/pkg/salt-minion.service and I think in this script there should be exec su -c salt-minion (at least I have tested that one with:
salt '*' cmd.exec_code python 'import os; print os.environ' (and /etc/environment variables are passed)
any comments appreciated