This bug was due to my lack of understanding of the way upstart works.
I've confirmed that crashes and subsequent respawns will use the
original environment variables.
That said, if ofono is restarted ( stop ofono/start ofono, or restart
ofono ), the environment variables are not set in the user'
@Tony, right, upstart uses the original environment when re-starting
after a crash.
The command line if you want to start/re-start ofono using upstart is:
# stop ofono
# start ofono OFONO_RIL_DEVICE=mtk OFONO_RIL_NUM_SIM_SLOTS=2
or
# restart ofono OFONO_RIL_DEVICE=mtk OFONO_RIL_NUM_SIM_SLOTS=2