[plug] debian startup scripts

James Devenish devenish at guild.uwa.edu.au
Fri Jan 30 13:04:26 WST 2004


Hi,

In message <s01a56ef.047 at mmtnetworks.com.au>
on Fri, Jan 30, 2004 at 01:06:53PM +0800, Jon  Miller wrote:
> 1) I understand that the scripts in /etc/rc2.d are in a certain order
> when the server boots up.  If the Snn is in the wrong order do I do a
> remove of the script and re-install the script and assign it the
> number it should be?

If you just want to rearrange the script for just a single runlevel,
you need merely rename the symlink. E.g:

mv /etc/rc2.d/S40blah /etc/rc2.d/S60blah

If you want to do this for all runlevels, you could choose to remove the
old symlinks. Here are two methods:

update-rc.d -f blah remove
rm /etc/rc?.d/???blah

> 2) If a certain script takes a while to finish and the next script is
> depending on the previous script to be up can I put in a sleep command
> in the script and willit hold up the remaining scripts?

The reason the script are numbered is so that they will be run in a
certain order. So, it is best to use the NN numbering to arrange your
scripts appropriately. Each script will then be executed sequentially,
one-at-a-time. So, you should not need to add any sleep command. The
exception is if you have a 'slow starting' daemon that goes into the
background before it is ready to work. In that case, the startup script
might finish before the daemon is ready. So, yes, you would need to
insert a sleep command (for example). All remaining scripts will be
held up until the sleep command finishes.





More information about the plug mailing list