AnsweredAssumed Answered

Something a little different.  Startup script using DHCP.  Looking for ideas.

Question asked by MarkBishop on Nov 29, 2012
Latest reply on Nov 30, 2012 by James.Kosin

So, right now I start up the board and I run 'dhcp &', which puts it in the background.  This gets me an IP address and the box keeps booting while the daemon spools up and get the IP address.  The script runs my app, which requires an IP address after a delay of some 20 seconds from when the dhcp server starts. The 20 seconds used by the dhcp daemon to get an address.  It looks like this:

 

dhcp &

sleep 20

/usr/local/bin/my_app &

 

This works just fine in the lab, but what happens when there is no DHCP server......The script runs 'dhcp', 20 seconds later it starts my app, which fails because I don't have an IP address.  So, I'm looking for some ideas on how to handle this.  I have a few but maybe someone who has had a similar situation may comment on how they solved their situation.

Outcomes