From nobody@FreeBSD.org  Mon Nov 18 09:28:07 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id A1E3A749
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 18 Nov 2013 09:28:07 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 8E56C2A1A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 18 Nov 2013 09:28:07 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rAI9S7uZ041922
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 18 Nov 2013 09:28:07 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rAI9S7hZ041888;
	Mon, 18 Nov 2013 09:28:07 GMT
	(envelope-from nobody)
Message-Id: <201311180928.rAI9S7hZ041888@oldred.freebsd.org>
Date: Mon, 18 Nov 2013 09:28:07 GMT
From: chris scott <kraduk@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: No delay feature in unbound startup script like in named
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         184047
>Category:       conf
>Synopsis:       No delay feature in unbound startup script like in named
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 18 09:30:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     chris scott
>Release:        intel 10-beta3
>Organization:
>Environment:
FreeBSD router10 10.0-BETA3 FreeBSD 10.0-BETA3 #0 r258162: Fri Nov 15 10:48:21 UTC 2013     krad@router10:/usr/obj/usr/src/sys/me  amd64
>Description:
bind has the following config options to stop the rc startup scripts running until the name server is up and running

named_wait="yes"                 # Wait for working name service before exiting
named_wait_host="localhost"     # Hostname to check if named_wait is enabled

The rc script for unbound doesnt have such a feature, therefore on machines where the resolver is localhost, things like ntpd which depend on name resolution can break.

[root@router10 /usr/src]# rcorder /etc/rc.d/*| egrep -n "(unbound|ntp)"
50:/etc/rc.d/local_unbound
74:/etc/rc.d/ntpdate
127:/etc/rc.d/ntpd

Adding similar delay functionality would be usful

>How-To-Repeat:
boot a machine with unbound as the name server and localhost specified and the resolver and have a resolution dependent service such as ntpd running
>Fix:
replicating the named_poststart () would be sufficient

>Release-Note:
>Audit-Trail:
>Unformatted:
