You need something in the until block that will change the state of the condition variable. They also don't usually take else blocks. Besides that, all your block is doing is returning whatever was captured from the external ping command. Worse yet, since the assignment to $ping is waiting on an external command, it'll wait until the ping stops.
Clearly I am confused on the usage of the until loop. And while I have reworked the code to avoid the until loop entirely I would be interested to see how someone would correctly write:
until something changes do this else do that
or am I now hoplessly confused?
--
lmoran@wtsg.com
There's more than one way to do it, just don't use my way.