Dave-ee Jones Posted April 11, 2017 Share Posted April 11, 2017 Hi guys, Once again, Dave-ee Jones comin' at you with another question! How would one loop forever until an IP address (172.16.64.10-12), via DHCP, has been given to the client? Looking for something like this... while cannot_see_client { sleep 1 } # Continue with rest of code Quote Link to comment Share on other sites More sharing options...
qdba Posted April 11, 2017 Share Posted April 11, 2017 2 hours ago, Dave-ee Jones said: Hi guys, Once again, Dave-ee Jones comin' at you with another question! How would one loop forever until an IP address (172.16.64.10-12), via DHCP, has been given to the client? Looking for something like this... while cannot_see_client { sleep 1 } # Continue with rest of code while [ $(ping -c 1 -W 1 172.16.64.10 >/dev/null ; echo $?) -ne 0 ] ; do sleep 1 done Quote Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted April 13, 2017 Author Share Posted April 13, 2017 (edited) On 4/11/2017 at 5:27 PM, qdba said: while [ $(ping -c 1 -W 1 172.16.64.10 >/dev/null ; echo $?) -ne 0 ] ; do sleep 1 done Thankin' yo'. Edited April 13, 2017 by Dave-ee Jones Quote Link to comment Share on other sites More sharing options...
MaA_DE Posted April 28, 2017 Share Posted April 28, 2017 Hi everyone, so the way @Dave-ee Jones asked for is 'best-practice' to check whether the driver e.g. for the the * _ETHERNET - attacks had been successfully installed? And thanks to @qdba for your reply! @Sebkinne: Is there a 'build-in-check' for being ready or is that something for the whishlist? Quote Link to comment Share on other sites More sharing options...
PoSHMagiC0de Posted April 28, 2017 Share Posted April 28, 2017 Wouldn't it be different in 1.1 while [ ! $TARGET_IP ]; do GET TARGET_IP sleep 1 done Quote Link to comment Share on other sites More sharing options...
LowValueTarget Posted May 2, 2017 Share Posted May 2, 2017 This could easily be an extension -- WAIT_FOR_IP Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.