Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I use Upstart and have the same we use to have by using "# Should-Start:" at the BEGIN INIT INFO of the init script?

Is it there any way I can tailor the "start on started" based on a variable?

share|improve this question
add comment

1 Answer

There is no direct equivalent in Upstart terms. If you want to do something similar, you can put your optional deps into pre-start section in your job.

Example (add to your conf file):

pre-start script
  set +e
  start <dep1>
  start <dep2>
  start <dep3>
  start <dep4>
end script

That makes Upstart try starting said optional services and if they are missing, the error is ignored.

share|improve this answer
    
Thanks for your response Tuminoid. It is “funny” how Ubuntu adopts new technology approaches without caring about Linux, that is its own root. Upstart, as it is, does not address several Unix/Linux issues we may have. Being your response “right”, the best solution in my case is to switch to some other distro that honors the Unix/Linux principles. I believe this does not bring any value added to Ubuntu. Now, for the Ubuntu community, just think that I may not be the only one willing to switch to another distro. Anyway, thanks for the help and cheers! Moacir –  Moacir Dec 11 '12 at 22:16
1  
This is incredibly confusing Moacir. The technique described works fine. What exactly is the problem that causes this to "not honor the Unix/Linux principles"? –  SpamapS May 30 '13 at 19:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.