[plug] debian startup scripts

Jon Miller jlmiller at mmtnetworks.com.au
Fri Jan 30 13:55:54 WST 2004


Thanks an example of this is when the modem dials in to the ISP it takes awhile before it completes, but before it can complete 2-3 other apps/scripts have run and thereby giving errors.

Thanks

Jon L. Miller, MCNE, CNS, ASE
Director/Sr Systems Consultant
MMT Networks Pty Ltd
http://www.mmtnetworks.com.au

"I don't know the key to success, but the key to failure
 is trying to please everybody." -Bill Cosby



>>> devenish at guild.uwa.edu.au 1:04:26 pm 30/01/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.


_______________________________________________
plug mailing list
plug at plug.linux.org.au 
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug 






More information about the plug mailing list