I have a couple ideas on how I would achieve this. Not sure how I would script it.
Method 1: (probably the better choice)
Create a loop that pings a server until reply is received then execute command
if no reply is received in X amount of time/runs continue script.
Method 2:
Check if network interface has valid IP then continue script
How would one go about adding this functionality in a script. Would awk or grep be of use in a situation like this? Thank you in advance for ANY input.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…