Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm making some init scripts to start some system services that require other services to have started in order to start successfully. For instance, one service requires that xenstored be running before it can start.

If I understand correctly, LSB init scripts have the following directives:

# Required-Start:
# Should-Start:
# Required-Stop:
# Should-Stop:

My question is, would it be sufficient to simply put xenstored after Required-Start: and what is the difference between Required and Should? Additionally, Does Debian 5 honor these directives?

share|improve this question
up vote 2 down vote accepted

Go ahead and use all those directives for forward compatibility (dependency-based booting), but they will not be used by Debian 5 (lenny). They are used beginning in Debian 6 (squeeze).

In lenny, you should just use:

# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6

And then when you install your init.d script do:

update-rc.d my-init-script defaults 25

Where 25 is greater than the number Y associated with xenstored in /etc/rc[2-5].d/Yxenstored

In Debian Squeeze, assuming xenstored "provides" xenstored:

# Required-Start: xenstored

For futher reading run:

man insserv
share|improve this answer
Thanks!! Hopefully this shows up in Debian backports as well. – Tim Post Mar 2 '11 at 3:51
@Tim: insserv is available on Lenny but since not all init scripts may have the necessary tags for it, installing it might break your system. – Arrowmaster Mar 2 '11 at 5:45

Your Answer


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.