Sense of "stop on..." stanza when job is a task
Posted
by
Binarus
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Binarus
Published on 2011-03-16T21:54:54Z
Indexed on
2011/03/18
0:18 UTC
Read the original article
Hit count: 202
Hi,
an upstart question (I think I have read all relevant man pages but could not find the answer there): What is the sense of using a "stop on ..." stanza in the definition of a job which is a task?
The manuals tell us that such a job, after being started, just waits until its script (or exec stanza) is executed completely, and then stops automatically. Given that, what is the point in using "stop on ..." stanzas in such job definitions?
For example, this is the job definition for Upstart's (very important) rc job in Natty 11.04 (leaving out comments and empty lines):
start on runlevel [0123456]
stop on runlevel [!$RUNLEVEL]
export RUNLEVEL
export PREVLEVEL
console output
env INIT_VERBOSE
task
exec /etc/init.d/rc $RUNLEVEL
IMHO, the job, after being started by a runlevel event, will be stopped automatically as soon as /etc/init.d/rc $RUNLEVEL
has finished.
Thank you very much for any explanation!
© Ask Ubuntu or respective owner