I'm trying to run something like:
sudo dhclient $wifi || otherFunction
Problem is when dhclient fails it just hangs instead of throwing an error.
How can I re-write the above so dhclient is killed and otherFunction gets called if dhclient doesn't finish in 60 seconds?