From nobody@FreeBSD.org  Fri Aug  5 06:56:50 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 00AE916A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  5 Aug 2005 06:56:50 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B9AC543D45
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  5 Aug 2005 06:56:49 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j756uncI029798
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 5 Aug 2005 06:56:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j756unZ1029792;
	Fri, 5 Aug 2005 06:56:49 GMT
	(envelope-from nobody)
Message-Id: <200508050656.j756unZ1029792@www.freebsd.org>
Date: Fri, 5 Aug 2005 06:56:49 GMT
From: Alexander Botero-Lowry <alex@complete-systems.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /etc/rc.d/[cleanvar, cleartmp, abi, power_profile] violate rc.d standards
X-Send-Pr-Version: www-2.3

>Number:         84574
>Category:       conf
>Synopsis:       /etc/rc.d/[cleanvar, cleartmp, abi, power_profile] violate rc.d standards
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 05 07:00:35 GMT 2005
>Closed-Date:    Tue Jan 17 07:20:52 GMT 2006
>Last-Modified:  Tue Jan 17 07:20:52 GMT 2006
>Originator:     Alexander Botero-Lowry
>Release:        6.0BETA1
>Organization:
>Environment:
FreeBSD Laptop 6.0-BETA1 FreeBSD 6.0-BETA1 #1: Sun Jul 31 23:21:29 EDT 2005     root@Laptop:/usr/src/sys/i386/compile/LAPTOP  i386

>Description:
      /etc/rc.d/cleanvar, cleartmp, abi, and power_profile do not follow Design and Implementation of the NetBSD rc.d System. [http://www.mewburn.net/luke/papers/rc.d.pdf]. When executed with rcvar each of these scripts behaves in a non standard way. cleanvar and cleartmp attempt to delete files which is a VERY bad behavior, if these scripts were to be run as root with simply rcvar (which SHOULD be harmless) they could damage the system (cleartmp could bring X11 down). abi prints superfolous garbage to the screen, and power_profile does not  have start or stop (or any standard behaviors of an rc.d script really. 
>How-To-Repeat:
      Mess around with the above mentioned rc scripts only minimally. (not as root you don't want to ruin X11 for example). 
>Fix:
      power_profile should be moved. abi should be re written to only print text when start is called. cleartmp and cleanvar should be rewritten to only delete files within a start function (or in the case of cleartmp possibly split into a script like clearx11, that is set to start by default). Specific patches and recommendations for some of the problems I've already submitted and can be found at misc/83969 and conf/84030. This is a major issue though it may seem trivial because it doesn't allow for good managment tools for the rc.d system. 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Mon Dec 5 09:23:15 GMT 2005 
Responsible-Changed-Why:  

I'll work on this issue 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84574 
State-Changed-From-To: open->patched 
State-Changed-By: dougb 
State-Changed-When: Mon Dec 19 10:57:21 UTC 2005 
State-Changed-Why:  

I've committed fixes for abi, cleanvar and cleartmp. 
power_profile will have to be dealt with differently, 
I will communicate with Nate about that. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84574 
State-Changed-From-To: patched->closed 
State-Changed-By: dougb 
State-Changed-When: Tue Jan 17 07:16:45 UTC 2006 
State-Changed-Why:  

Fixes for abi, cleanvar, and cleartmp were just MFC'ed to 
RELENG_6. They will not be MFC'ed to RELENG_5. 

power_profile has other issues. In brief discussion with 
njl he indicated willingness to pursue this, but it will 
take some time to work out the best solution. 

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