1

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?

Tim Post
  • 1,515
  • 13
  • 25

1 Answers1

2

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
chrishiestand
  • 974
  • 12
  • 23