From girgen@elbas.partitur.se  Tue Mar 14 15:56:14 2000
Return-Path: <girgen@elbas.partitur.se>
Received: from elbas.partitur.se (elbas.partitur.se [193.219.246.222])
	by hub.freebsd.org (Postfix) with ESMTP id C35DA37B742
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 14 Mar 2000 15:56:09 -0800 (PST)
	(envelope-from girgen@elbas.partitur.se)
Received: (from girgen@localhost)
	by elbas.partitur.se (8.9.3/8.9.3) id AAA60599;
	Wed, 15 Mar 2000 00:56:02 +0100 (CET)
	(envelope-from girgen)
Message-Id: <200003142356.AAA60599@elbas.partitur.se>
Date: Wed, 15 Mar 2000 00:56:02 +0100 (CET)
From: Palle Girgensohn <girgen@partitur.se>
Sender: girgen@elbas.partitur.se
Reply-To: Palle Girgensohn <girgen@partitur.se>
To: FreeBSD-gnats-submit@freebsd.org
Subject: periodic(8) doesn't care about the local /etc/rc.conf
X-Send-Pr-Version: 3.2

>Number:         17378
>Category:       bin
>Synopsis:       periodic(8) doesn't care about the local /etc/rc.conf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 14 16:00:01 PST 2000
>Closed-Date:    Wed Mar 15 00:34:42 PST 2000
>Last-Modified:  Wed Mar 15 00:35:08 PST 2000
>Originator:     Palle Girgensohn
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Partitur
>Environment:
FreeBSD elbas.partitur.se 4.0-CURRENT FreeBSD 4.0-CURRENT #2: Wed Mar  1 01:03:22 CET 2000     girgen@elbas.partitur.se:/opt/current/src/sys/compile/WORKSTATION
i386

	

>Description:
in /usr/sbin/periodic, the shell script first eat
/etc/defaults/rc.conf and then only if that file does not exist does
it try to read /etc/rc.conf. Isn't /etc/rc.conf supposed to override
/etc/defaults/rc.conf?

	

>How-To-Repeat:

	

>Fix:

	

=== cd /opt/current/src/usr.sbin/periodic/
=== cvs diff -u periodic.sh

Index: periodic.sh
===================================================================
RCS file: /opt/ncvs/src/usr.sbin/periodic/periodic.sh,v
retrieving revision 1.9
diff -u -u -r1.9 periodic.sh
--- periodic.sh	1999/08/28 01:17:52	1.9
+++ periodic.sh	2000/03/14 23:46:22
@@ -22,7 +22,8 @@
 # to see if there are additional dirs to check
 if [ -r /etc/defaults/rc.conf ]; then
     . /etc/defaults/rc.conf
-elif [ -r /etc/rc.conf ]; then
+fi
+if [ -r /etc/rc.conf ]; then
     . /etc/rc.conf
 fi
 
=== Exit status: 1

>Release-Note:
>Audit-Trail:

From: "Matthew D. Fuller" <fullermd@futuresouth.com>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: bin/17378: periodic(8) doesn't care about the local /etc/rc.conf
Date: Tue, 14 Mar 2000 18:16:53 -0600

 On Wed, Mar 15, 2000 at 12:56:02AM +0100, a little birdie told me
 that Palle Girgensohn remarked
 > 
 > >Description:
 > in /usr/sbin/periodic, the shell script first eat
 > /etc/defaults/rc.conf and then only if that file does not exist does
 > it try to read /etc/rc.conf. Isn't /etc/rc.conf supposed to override
 > /etc/defaults/rc.conf?
 
 root% tail -6 /etc/defaults/rc.conf
 for i in ${rc_conf_files}; do
         if [ -f $i ]; then
                 . $i
         fi
 done
 
 
 
 -- 
 Matthew Fuller     (MF4839)     |    fullermd@over-yonder.net
 Unix Systems Administrator      |    fullermd@futuresouth.com
 Specializing in FreeBSD         |    http://www.over-yonder.net/
 
 "The only reason I'm burning my candle at both ends, is because I
       haven't figured out how to light the middle yet"
 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Wed Mar 15 00:34:42 PST 2000 
State-Changed-Why:  
This was a question, nota bug report.  It's been answered. :-) 
>Unformatted:
