Question about lifetime of environment variables in job files
Garrett Cooper
yanegomi at gmail.com
Fri Oct 31 03:16:22 GMT 2008
Just doing some more testing and while I understand while this would
most likely not work, I'm still wondering if it's documented or not:
[nova-cavium5:/etc/init/jobs.d]$ cat env_test
console output
env VAR=0
script
echo "BEFORE: $VAR"
let "VAR=$VAR+1"
echo "AFTER: $VAR"
end script
pre-stop script
echo "POST MESS: $VAR"
end script
[nova-cavium5:~]$ start env_test
[nova-cavium5:~]$ BEFORE: 0
AFTER: 1
[nova-cavium5:~]$
The more strange issue is that the echo in pre-stop isn't executed --
is there a known issue with console output and pre-stop / post-stop?
-Garrett
More information about the upstart-devel
mailing list