LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   upstart jobs (https://www.linuxquestions.org/questions/linux-newbie-8/upstart-jobs-758643/)

newk 09-30-2009 05:43 AM

upstart jobs
 
The following is a quote from "A Practical Guide to Ubuntu Linux" by Mark G. Sobell:

""The following administrator-defined job uses the exec keyword to execute a shell command. You can also use this keyword to execute a shell script stored in a file or a binary executable file.

$ cat /etc/event.d/mudat
start on runlevel 2
exec echo "Entering multiuser mode on " $(date) > /tmp/mudat.out

This file defines a task: It runs the echo shell command when the system enters multiuser mode (runlevel 2).""

As I've learnt one could use exec because exec does not return control to the original program.

My question is what exec for in the above example if anyway a task in the upstart system is a job that performs its work and returns to a waiting state when it is done.

Thanks in advance for your answers.

I've maarked the post as solved because I think I'm just careless - exec here is for a job to be monitored, just upstart syntax, right?

the trooper 09-30-2009 06:13 AM

You do know you have marked this thread solved?.

newk 09-30-2009 06:27 AM

???. I think I have found an explanation for myself and marked the thread as solved. What is wrong? Sorry for my careless because I was in a hurry and the explanations are a little later in the book. Sorry again.

the trooper 09-30-2009 06:44 AM

Quote:

???. I think I have found an explanation for myself and marked the thread as solved. What is wrong?
Nothing wrong at all.
Just wanted to make sure that's what you wanted to do;)

newk 09-30-2009 07:03 AM

Thanks. *nixs are like new world outlook for me so sometimes I'm frustrated with concepts seemed clear to me. But as always solution is somewhere near and only time needed and of course not rush...


All times are GMT -5. The time now is 08:29 AM.