export variable inheritance question

Garrett Cooper yanegomi at gmail.com
Fri Oct 2 23:41:38 BST 2009


Hi Scott,
    We recently ran into a slightly unexpected side-effect where we
exported a variable in a jobfile, like so:

# job1
env VAR=1
export VAR

# job2
start on job1

    And $VAR was visible from job2 with the value set in job1 (in this
case $VAR => 1). Is that intended behavior?
    My group is still stuck with 0.5.0, BTW...
Thanks,
-Garrett

[o:~]$ start job1
[o:~]$ cat /etc/init/jobs.d/job*
env VAR=1
export VAR
console output
start on started job1
exec env > job2.env
[o:~]$ cat /job2.env
TERM=linux
VAR=1
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:NONE/sbin
PWD=/
JOB=job1
SHLVL=0
UPSTART_INSTANCE=
UPSTART_EVENTS=started
UPSTART_JOB=job2
INSTANCE=



More information about the upstart-devel mailing list