From owner-freebsd-bugs@FreeBSD.ORG Thu Dec 22 21:32:11 2011 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6443F106566C; Thu, 22 Dec 2011 21:32:11 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id 49AC38FC0A; Thu, 22 Dec 2011 21:32:11 +0000 (UTC) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 123DC1434F; Thu, 22 Dec 2011 13:32:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1324589531; bh=YoC7A4HYgI4OZY5cNDSJoUZ1gsig+DN3LndQ/8MilMg=; h=Message-ID:Date:From:Reply-To:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=zPXniO/KyakN+y1RSlj/4Rk6Cm+PX/N4HIxjof8d0+3J1A/4C8sm4NIGCt9M2Fwq2 a1ub2JtO9cOBh2mKSMs4H6mZSOHpCOGOKm+0kX+O74z22Qx8Kbg0DOus/LLqM3fp1h PWCv3DxilS93Ea737M5+HVGJT6rTURNaC/qKuk1A= Message-ID: <4EF3A1DA.90507@delphij.net> Date: Thu, 22 Dec 2011 13:32:10 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: fdn@okbire.ru References: <201109232330.p8NNUBFU008137@freefall.freebsd.org> In-Reply-To: X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-bugs@freebsd.org, FreeBSD-gnats-submit@freebsd.org, d@delphij.net Subject: Re: conf/160960: [patch] /etc/rc.d/named X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 21:32:11 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, On 12/22/11 13:13, Dmitry N Fomin wrote: > Somebody can confirm this problem and try patch? Thanks. I'm not quite satisfied with this version of patch -- host command have its own timeout rules and it's less than optimal when a computer stays stall for a few minutes while it says only 9 seconds. By the way this loses one functionality -- the admin wants the system to boot until a name service query is available, what shall he/she do? My suggestion would be consider a negative number as "wait forever" here. > --- /usr/src/etc/rc.d/named 2010-12-21 17:09:25.000000000 +0000 +++ > /usr/src/etc/rc.d/named 2011-09-24 08:55:27.000000000 +0000 @@ > -100,9 +100,22 @@ make_symlinks > > if checkyesno named_wait; then - until > ${command%/sbin/named}/bin/host $named_wait_host >/dev/null 2>&1; > do - echo " Waiting for nameserver to resolve $named_wait_host" + > if [ -z "${named_wait_timeout}" ]; then + > named_wait_timeout="10" + fi + local > timeout="${named_wait_timeout}" + until > ${command%/sbin/named}/bin/host -W 1 $named_wait_host >/dev/null > 2>&1; do + if [ $timeout -eq $named_wait_timeout ]; then + > echo " Waiting for nameserver to resolve $named_wait_host" + > echo "" + fi sleep 1 + timeout=$(($timeout - 1)) + echo -e > "\033[A Remains to wait time - ${timeout} sec." + if [ $timeout > -le 0 ]; then + echo " Wait time (${named_wait_timeout} sec.) > has effused." + break + fi done fi } > > --- /usr/src/etc/defaults/rc.conf 2010-12-21 17:09:25.000000000 > +0000 +++ /usr/src/etc/defaults/rc.conf 2011-09-23 > 18:43:44.000000000 +0000 @@ -279,6 +279,7 @@ > named_symlink_enable="YES" # Symlink the chrooted pid file > named_wait="NO" # Wait for working name service before exiting > named_wait_host="localhost" # Hostname to check if named_wait is > enabled +named_wait_timeout="10" # Timeout in seconds if > named_wait is enabled named_auto_forward="NO" # Set up forwarders > from /etc/resolv.conf named_auto_forward_only="NO" # Do "forward > only" instead of "forward first" > > > > _______________________________________________ > freebsd-bugs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To > unsubscribe, send any mail to > "freebsd-bugs-unsubscribe@freebsd.org" - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7zodkACgkQOfuToMruuMBoLACfdWlpIvkFhmfjHbBlOSbMg3Sv R/wAnispG8cqieBl842CK2kyvsbxfUXN =7PnV -----END PGP SIGNATURE-----