From owner-svn-src-all@FreeBSD.ORG Thu Apr 11 22:09:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5725128A; Thu, 11 Apr 2013 22:09:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 498D61E69; Thu, 11 Apr 2013 22:09:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BM90RQ033764; Thu, 11 Apr 2013 22:09:00 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BM90qo033763; Thu, 11 Apr 2013 22:09:00 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201304112209.r3BM90qo033763@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Apr 2013 22:09:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249388 - stable/8/etc/rc.d X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 22:09:00 -0000 Author: bz Date: Thu Apr 11 22:08:59 2013 New Revision: 249388 URL: http://svnweb.freebsd.org/changeset/base/249388 Log: MFC r245525: Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces. Do this per jail started, not per address. This will allow DAD to complete and services to properly start. Before we have seen problems with services trying to start before the IPv6 address was available to use and thus erroring and failing to start. Modified: stable/8/etc/rc.d/jail Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.d/jail ============================================================================== --- stable/8/etc/rc.d/jail Thu Apr 11 22:04:19 2013 (r249387) +++ stable/8/etc/rc.d/jail Thu Apr 11 22:08:59 2013 (r249388) @@ -507,7 +507,7 @@ jail_handle_ips_option() esac case "${_type}" in inet) ;; - inet6) ;; + inet6) ipv6_address_count=$((ipv6_address_count + 1)) ;; *) warn "Could not determine address family. Not going" \ "to ${_action} address '${_addr}' for ${_jail}." continue @@ -544,6 +544,7 @@ jail_ips() esac # Handle addresses. + ipv6_address_count=0 jail_handle_ips_option ${_action} "${_ip}" # Handle jail_xxx_ip_multi alias=0 @@ -556,6 +557,12 @@ jail_ips() ;; esac done + case ${ipv6_address_count} in + 0) ;; + *) # Sleep 1 second to let DAD complete before starting services. + sleep 1 + ;; + esac } jail_start()