--- etc/rc.d/local_unbound 2016-05-28 11:23:02.757975916 +0200 +++ etc/rc.d/local_unbound.NEW 2016-05-28 11:25:14.763787419 +0200 @@ -100,15 +100,7 @@ local retry=5 echo -n "Waiting for nameserver to start..." - until "${command}-control" status | grep -q "is running" ; do - if [ $((retry -= 1)) -eq 0 ] ; then - echo " giving up" - return 1 - fi - echo -n "." - sleep 1 - done - echo " good" + host -W 1 -R ${retry} -t NS com 127.0.0.1 > /dev/null && echo " good" || echo " giving up" } load_rc_config $name