Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Handling DHCP timeouts in script
2012-11-06, 09:03
Post: #2
RE: Handling DHCP timeouts in script
Your script is almost good. I believe the isset in the dhcp line starts a new conditional, so if dhcp fails, it will indeed exit.

I would do something like this instead:
Code:
:retry_dhcp
dhcp || goto retry_dhcp
isset ${filename} || goto retry_dhcp

Then again, I don't understand why you check if the ${filename} variable is set, when you don't use it later. I would just skip that line, as it doesn't really make any difference in your script. After all, if the dhcp fails to retrieve an IP it will fail and go back to retry_dhcp.

You might want to consider jumping back to :retry_dhcp instead of :iscsiboot if the sanboot fails, as it will just be standing there looping on trying to connect to the same target if it isn't able to connect. Depending on your setup, that might be exactly what you want, but redoing the dhcp and trying to connect again seems like a more robust setup.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Handling DHCP timeouts in script - robinsmidsrod - 2012-11-06 09:03



User(s) browsing this thread: 1 Guest(s)