From nobody@FreeBSD.org  Thu Dec 30 12:43:19 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 458081065672
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Dec 2010 12:43:19 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 3503F8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Dec 2010 12:43:19 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oBUChIhR082901
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Dec 2010 12:43:18 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oBUChIgQ082900;
	Thu, 30 Dec 2010 12:43:18 GMT
	(envelope-from nobody)
Message-Id: <201012301243.oBUChIgQ082900@red.freebsd.org>
Date: Thu, 30 Dec 2010 12:43:18 GMT
From: Sean McAfee <smcafee@collaborativefusion.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Allow periodic to read periodic.conf from /usr/local/etc/
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         153543
>Category:       conf
>Synopsis:       [periodic] [patch] Allow periodic to read periodic.conf from /usr/local/etc/
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 30 12:50:08 UTC 2010
>Closed-Date:    
>Last-Modified:  Thu Dec 30 22:14:06 UTC 2010
>Originator:     Sean McAfee
>Release:        FreeBSD 8.1
>Organization:
Collaborative Fusion, Inc.
>Environment:
FreeBSD xxxx 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #1: Wed Dec  8 11:56:34 UTC 2010     root@xxxx:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
In an effort to simplify our configurations, we tried moving our periodic.conf (which controls a few local periodic scripts installed to /usr/local/etc/periodic/) to /usr/local/etc/, only to find that the only overrides listed in /etc/defaults/periodic.conf are /etc/periodic.conf and /etc/periodic.conf.local.

Since locally installed periodic scripts make their way into /usr/local/etc/periodic (instead of /etc/periodic), it makes sense to have the configuration live in /usr/local/etc/ as well.

This seems to be more of an oversight (or holdover from OpenBSD ported code), than a deliberate decision. 
>How-To-Repeat:
Attempt to install a /usr/local/etc/periodic.conf that controls which scripts are run.
>Fix:
Apply the attached patch (done against 8.2-RC1).

Patch attached with submission follows:

--- /etc/defaults/periodic.conf.orig	2010-12-30 07:36:38.000000000 -0500
+++ /etc/defaults/periodic.conf	2010-12-30 07:37:01.000000000 -0500
@@ -17,7 +17,7 @@
 #
 
 # What files override these defaults ?
-periodic_conf_files="/etc/periodic.conf /etc/periodic.conf.local"
+periodic_conf_files="/etc/periodic.conf /etc/periodic.conf.local /usr/local/etc/periodic.conf"
 
 # periodic script dirs
 local_periodic="/usr/local/etc/periodic"


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