From nobody@FreeBSD.org  Sun May  2 21:24:16 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 274001065672
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  2 May 2010 21:24:16 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 165578FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  2 May 2010 21:24:16 +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 o42LOE4B058187
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 2 May 2010 21:24:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o42LOELg058186;
	Sun, 2 May 2010 21:24:14 GMT
	(envelope-from nobody)
Message-Id: <201005022124.o42LOELg058186@www.freebsd.org>
Date: Sun, 2 May 2010 21:24:14 GMT
From: "Pawe&#322; Kaczor" <paczor@fubar.pl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: periodic emits repeated messages because of /usr/X11R6 link to /usr/local
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         146255
>Category:       conf
>Synopsis:       periodic(8) emits repeated messages because of /usr/X11R6 link to /usr/local
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 02 21:30:04 UTC 2010
>Closed-Date:    Wed Jun 16 13:50:28 UTC 2010
>Last-Modified:  Wed Jun 16 13:50:28 UTC 2010
>Originator:     Pawe&#322; Kaczor
>Release:        6.3-RELEASE
>Organization:
IT Gens Sp. z o.o.
>Environment:
FreeBSD gustlik.fubar.pl 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Fri Feb 15 13:29:20 CET 2008     root@berta.swired2:/usr/obj/usr/src/sys/MYKERNEL  alpha
>Description:
There's a line in /etc/defaults/periodic.conf:
local_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic"
with additional dirs that periodic should look in for scripts.
But /usr/X11R6 is soft link to /usr/local, so both paths listed above are same, so periodic runs the very same scripts twice.
I noticed it on my Alpha machine on FreeBSD 6.3, don't know if those paths are from the setup time or some of the packages installed them.
>How-To-Repeat:
Put some simple script with this line inside:
echo "This message is repeated!"
in /usr/local/etc/periodic/security
and run:
periodic security
You should see the message twice.
>Fix:
Replace line:
local_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic"
with:
local_periodic="/usr/local/etc/periodic"
in "/etc/defaults/periodic.conf".

>Release-Note:
>Audit-Trail:

From: John Baldwin <john@baldwin.cx>
To: freebsd-alpha@freebsd.org
Cc: "Pawe&#322; Kaczor" <paczor@fubar.pl>,
 freebsd-gnats-submit@freebsd.org
Subject: Re: alpha/146255: periodic emits repeated messages because of /usr/X11R6 link to /usr/local
Date: Mon, 3 May 2010 10:03:18 -0400

 On Sunday 02 May 2010 5:24:14 pm Pawe&#322; Kaczor wrote:
 > 
 > >Number:         146255
 > >Category:       alpha
 > >Synopsis:       periodic emits repeated messages because of /usr/X11R6 link 
 to /usr/local
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    freebsd-alpha
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Sun May 02 21:30:04 UTC 2010
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Pawe&#322; Kaczor
 > >Release:        6.3-RELEASE
 > >Organization:
 > IT Gens Sp. z o.o.
 > >Environment:
 > FreeBSD gustlik.fubar.pl 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Fri Feb 15 
 13:29:20 CET 2008     root@berta.swired2:/usr/obj/usr/src/sys/MYKERNEL  alpha
 > >Description:
 > There's a line in /etc/defaults/periodic.conf:
 > local_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic"
 > with additional dirs that periodic should look in for scripts.
 > But /usr/X11R6 is soft link to /usr/local, so both paths listed above are 
 same, so periodic runs the very same scripts twice.
 > I noticed it on my Alpha machine on FreeBSD 6.3, don't know if those paths 
 are from the setup time or some of the packages installed them.
 > >How-To-Repeat:
 > Put some simple script with this line inside:
 > echo "This message is repeated!"
 > in /usr/local/etc/periodic/security
 > and run:
 > periodic security
 > You should see the message twice.
 > >Fix:
 > Replace line:
 > local_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic"
 > with:
 > local_periodic="/usr/local/etc/periodic"
 > in "/etc/defaults/periodic.conf".
 
 This isn't likely to be fixed in 6.x as that branch is EOL at this point.
 
 -- 
 John Baldwin
Responsible-Changed-From-To: freebsd-alpha->freebsd-bugs 
Responsible-Changed-By: jilles 
Responsible-Changed-When: Sat May 15 14:47:11 UTC 2010 
Responsible-Changed-Why:  
Not an alpha-specific issue. 

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

From: Alexander Best <alexbestms@uni-muenster.de>
To: bug-followup@FreeBSD.org
Cc: "Pawe&#322, Kaczor" <paczor@fubar.pl>, John Baldwin <john@baldwin.cx>
Subject: Re: conf/146255: periodic(8) emits repeated messages because of 
	/usr/X11R6 link to /usr/local
Date: Tue, 15 Jun 2010 01:14:15 +0200

 fixed in HEAD, 8 and 7 by r170085. the commit message states:
 
 "It is not anticipated at this time that we will MFC this change, since
 we'd like to avoid breaking legacy systems. However, there is a fix for
 /etc/rc.subr in the works to avoid running any rc.d scripts twice which
 we should be able to MFC."
 
 i don't know if the patch to /etc/rc.subr that got mentioned in the
 commit message ever made it into RELENG_6 (or any other branch).
 
 however since the actual commit can't be merged into RELENG_6 for
 legacy reasons (as stated in the commit message of r170085) this pr
 should be closed.
 
 it would be interesting to know if in fact at some point in the past
 /etc/rc.subr got modified so rc.d scripts cannot be run twice. if this
 is the case this pr would have been solved by that change without the
 need for r170085.
 
 cheers.
 
 -- 
 Alexander Best
State-Changed-From-To: open->closed 
State-Changed-By: brd 
State-Changed-When: Wed Jun 16 13:50:07 UTC 2010 
State-Changed-Why:  
Close. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=146255 
>Unformatted:
