waitfor system call

Hi,

In my script file, I have used
“waitfor /dev/io-net/en0” to wait for creation of my device.

But it looks, that it does not wait for the device to be created, rather proceed further. The script executes the next commands, and it takes approximately 2-3 seconds for creating the device in the directory.

Could anyone please let me know, what could be the reason??

thanks in advance,

BR,
-Dheeraj

I have always used it with a timeout.
Did you try ‘waitfor /dev/io-net/en0 5’ ?
Or alternatively waiting for /dev/socket ?
What do you get if issue ‘waitfor some_inexisting_file 5’ ?
Could the device already exist ?

if you are waiting to get an ip (via dhcp) have a look t the if_up command.

thanks.
I never tried with timeout, but will check.

-Dheeraj

Hi,

Unfortunately it is not working for me.
Could be the reason, that I am calling this from the startup script?

BR,
-Dheeraj

I used waitfor /dev/ in my startup script without any problems, I think the default timeout is 5 or 10 secs

Regards,
Albrecht

its working. the problem was with the startup script.
thanks a lot.