On Thu, 22 Apr 1999, Arno Verhoeven wrote:

> Just a short question.
> When I look at sample configuration files, I sometimes see that people
> follow an  sccinit  or  ifconfig  with a  sleep 1  command.
> What would be the reason for the sleep command?
> The reason is probably very obvious, but I don't see it.

Some of the utilities fork and exec a new copy of them selves and return
immediately. The copy process then does whatever the utility does.  The
effect is the same as executing a program in the background with ampersand
(&). 

The problem with all this is that the script execution continues
immediately after starting the command without waiting for it to complete.
Now if the following command depends in some way on the previous command,
there is a possibility that the previous command has not completed its
task. For example if you first kissattach an interface and then try to set
up the netmask with ifconfig, it is possible that the interface isn't
there yet when ifconfig is called. And that is why sometimes a small delay
is added in between as a safety precaution.

I don't know about sccinit but ifconfig shouldn't need such a precaution.
It doesn't return until it has done its job.

-- 
--... Tomi Manninen / [EMAIL PROTECTED] / OH2BNS @ OH2RBI.FIN.EU ...--

Reply via email to