From nobody@FreeBSD.org  Thu Apr  8 22:07:54 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 128521065670
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  8 Apr 2010 22:07:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 01A108FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  8 Apr 2010 22:07:54 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o38M7r4d086287
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 8 Apr 2010 22:07:53 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o38M7r6a086284;
	Thu, 8 Apr 2010 22:07:53 GMT
	(envelope-from nobody)
Message-Id: <201004082207.o38M7r6a086284@www.freebsd.org>
Date: Thu, 8 Apr 2010 22:07:53 GMT
From: Piotr Smyrak <smyru@heron.pl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ntpdate rc needs wpa_supplicant to go online
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         145530
>Category:       conf
>Synopsis:       [rc.d] ntpdate(8): ntpdate rc needs wpa_supplicant to go online
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 08 22:10:03 UTC 2010
>Closed-Date:    Fri Apr 09 23:58:34 UTC 2010
>Last-Modified:  Tue Apr 13 17:00:11 UTC 2010
>Originator:     Piotr Smyrak
>Release:        FreeBSD 8.0-STABLE amd64
>Organization:
>Environment:
FreeBSD dsk.smyrak.com 8.0-STABLE FreeBSD 8.0-STABLE #0: Sun Mar 14 17:22:16 CET 2010     root@dsk:/usr/obj/amd64/usr/src/sys/SMYRU  amd64
>Description:
Since I started to use wifi card with wpa_supplicant after upgrading to
8-STABLE on every boot ntpdate rc will fail to sync with time server,
since it is run before wpa_supplicant does its work.

See this thread:
http://forums.freebsd.org/showthread.php?t=7277

$ rcorder /etc/rc.d/*|grep -nE 'ntpdate|wpa'
68:/etc/rc.d/ntpdate
77:/etc/rc.d/wpa_supplicant

>How-To-Repeat:
1. disconnect any wired NIC
2. setup wifi to be configured via wpa_supplicant
3. set ntpdate_enable in rc.conf
4. reboot
>Fix:
Add wpa_supplicant to REQUIREs in ntpdate

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Apr 9 05:47:54 UTC 2010 
Responsible-Changed-Why:  
Appears to affect rc.d. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145530 

From: Garrett Cooper <yanefbsd@gmail.com>
To: Piotr Smyrak <smyru@heron.pl>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: conf/145530: ntpdate rc needs wpa_supplicant to go online
Date: Thu, 8 Apr 2010 22:37:44 -0700

 On Thu, Apr 8, 2010 at 3:07 PM, Piotr Smyrak <smyru@heron.pl> wrote:
 >
 >>Number: =A0 =A0 =A0 =A0 145530
 >>Category: =A0 =A0 =A0 conf
 >>Synopsis: =A0 =A0 =A0 ntpdate rc needs wpa_supplicant to go online
 >>Confidential: =A0 no
 >>Severity: =A0 =A0 =A0 non-critical
 >>Priority: =A0 =A0 =A0 low
 >>Responsible: =A0 =A0freebsd-bugs
 >>State: =A0 =A0 =A0 =A0 =A0open
 >>Quarter:
 >>Keywords:
 >>Date-Required:
 >>Class: =A0 =A0 =A0 =A0 =A0sw-bug
 >>Submitter-Id: =A0 current-users
 >>Arrival-Date: =A0 Thu Apr 08 22:10:03 UTC 2010
 >>Closed-Date:
 >>Last-Modified:
 >>Originator: =A0 =A0 Piotr Smyrak
 >>Release: =A0 =A0 =A0 =A0FreeBSD 8.0-STABLE amd64
 >>Organization:
 >>Environment:
 > FreeBSD dsk.smyrak.com 8.0-STABLE FreeBSD 8.0-STABLE #0: Sun Mar 14 17:22=
 :16 CET 2010 =A0 =A0 root@dsk:/usr/obj/amd64/usr/src/sys/SMYRU =A0amd64
 >>Description:
 > Since I started to use wifi card with wpa_supplicant after upgrading to 8=
 -STABLE on every boot ntpdate rc will fail to sync with time server, since =
 it is run before wpa_supplicant does its work.
 >
 > See this thread:
 > http://forums.freebsd.org/showthread.php?t=3D7277
 >
 > $ rcorder /etc/rc.d/*|grep -nE 'ntpdate|wpa'
 > 68:/etc/rc.d/ntpdate
 > 77:/etc/rc.d/wpa_supplicant
 >
 >>How-To-Repeat:
 > 1. disconnect any wired NIC
 > 2. setup wifi to be configured via wpa_supplicant
 > 3. set ntpdate_enable in rc.conf
 > 4. reboot
 >>Fix:
 > Add wpa_supplicant to REQUIREs in ntpdate
 
     This is actually a requirement for all network connectivity, not
 just ntpdate.
 Thanks for the report :),
 -Garrett
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Fri Apr 9 23:56:23 UTC 2010 
State-Changed-Why:  

wpa_supplicant is only called by methods in network.subr which are called 
from rc.d/netif. It's not directly part of rcorder. 


Responsible-Changed-From-To: freebsd-rc->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Fri Apr 9 23:56:23 UTC 2010 
Responsible-Changed-Why:  

I'm closing this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145530 

From: smyru@heron.pl
To: dougb@FreeBSD.org,freebsd-rc@FreeBSD.org
Cc: bug-followup@FreeBSD.org
Subject: Re: conf/145530: [rc.d] ntpdate(8): ntpdate rc needs wpa_supplicant to go online
Date: Tue, 13 Apr 2010 18:49:16 +0200

 Please note that this report is primarily about ntpdate needing a 
 working Internet connection, and not complain about the order of 
 rc's. Closing it does not make the original problem go away. 
 
 I pointed at the RC order since it was a known workaround. I am open 
 for discussion what would be the proper way to fix the problem.
 
 Best regards,
 -- 
  Piotr Smyrak
  piotr.smyrak@heron.pl
 
>Unformatted:
