From evanc@synapse.net  Sat Nov 15 07:26:15 1997
Received: from piano.synapse.net (piano.synapse.net [199.84.54.19])
          by hub.freebsd.org (8.8.7/8.8.7) with SMTP id HAA12411
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 15 Nov 1997 07:26:13 -0800 (PST)
          (envelope-from evanc@synapse.net)
Received: (qmail 28187 invoked by uid 1001); 15 Nov 1997 15:26:10 -0000
Message-Id: <19971115152610.28186.qmail@piano.synapse.net>
Date: 15 Nov 1997 15:26:10 -0000
From: evanc@synapse.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: evanc@synapse.net
Subject: /tmp not nuked on reboot
X-Send-Pr-Version: 3.2

>Number:         5054
>Category:       misc
>Synopsis:       /tmp not nuked on reboot
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    steve
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 15 07:30:02 PST 1997
>Closed-Date:    Sun Nov 16 04:56:39 PST 1997
>Last-Modified:  Sun Nov 16 04:57:30 PST 1997
>Originator:     Evan Champion
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

	

>Description:

	/tmp is not nuked on reboot.  It should be, with an option to
	disable in /etc/rc.conf.

>How-To-Repeat:

	

>Fix:
	
	Here's what BSDI uses.  Try to change a few words :-)

echo clearing /tmp

# prune quickly with one rm, then use find to clean up /tmp/[lq]*
# (not needed with mfs /tmp, but doesn't hurt there...)
(cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
    find -d . ! -name . ! -name lost+found ! -name quotas \
        ! -name quota.user ! -name quota.group -exec rm -rf -- {} \;)

>Release-Note:
>Audit-Trail:

From: Steve Price <sprice@hiwaay.net>
To: evanc@synapse.net
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, freebsd-bugs@hub.freebsd.org
Subject: Re: misc/5054: /tmp not nuked on reboot
Date: Sat, 15 Nov 1997 14:35:35 -0600 (CST)

 On 15 Nov 1997 evanc@synapse.net wrote:
 
 # 
 # >Fix:
 # 	
 # 	Here's what BSDI uses.  Try to change a few words :-)
 # 
 # echo clearing /tmp
 # 
 # # prune quickly with one rm, then use find to clean up /tmp/[lq]*
 # # (not needed with mfs /tmp, but doesn't hurt there...)
 # (cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
 #     find -d . ! -name . ! -name lost+found ! -name quotas \
 #         ! -name quota.user ! -name quota.group -exec rm -rf -- {} \;)
 # 
 
 Try the attached patch on a -current system.  This will get what
 you want.  As far as a switch in rc.conf, you might drop pst@FreeBSD.org
 a line since the new periodic crontab changes are his.
 
 Steve
 
 Index: 110.clean-tmps
 ===================================================================
 RCS file: /tmp/src/cvs/src/etc/periodic/daily/110-clean-tmps,v
 retrieving revision 1.3
 diff -u -r 1.3 110.clean-tmps
 --- 110.clean-tmps	1997/09/11 15:21:30	1.3
 +++ 110.clean-tmps	1997/11/15 20:34:26
 @@ -12,7 +12,7 @@
  # run.
  #
 
 -exit 0		# do not run by default
 +#exit 0		# do not run by default
 
  if [ -d /tmp ]; then
      cd /tmp && {
 
 

From: Evan Champion <evanc@synapse.net>
To: Steve Price <sprice@hiwaay.net>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, freebsd-bugs@hub.freebsd.org
Subject: Re: misc/5054: /tmp not nuked on reboot
Date: Sat, 15 Nov 1997 15:38:52 -0500 (EST)

 On Sat, 15 Nov 1997, Steve Price wrote:
 
 > Try the attached patch on a -current system.  This will get what
 > you want.  As far as a switch in rc.conf, you might drop pst@FreeBSD.org
 > a line since the new periodic crontab changes are his.
 
 Well, not quite, since that only gets run out of crontab.  Something
 should be run on boot, and it needs to nuke everything (except the
 exclusions mentionned in my original post, ie: quotas and lost+found). 
 
 Evan
 

From: Evan Champion <evanc@synapse.net>
To: Steve Price <sprice@hiwaay.net>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, freebsd-bugs@hub.freebsd.org
Subject: Re: misc/5054: /tmp not nuked on reboot
Date: Sat, 15 Nov 1997 15:40:23 -0500 (EST)

 On Sat, 15 Nov 1997, Steve Price wrote:
 
 > Try the attached patch on a -current system.  This will get what
 > you want.  As far as a switch in rc.conf, you might drop pst@FreeBSD.org
 > a line since the new periodic crontab changes are his.
 
 As an aside, won't the 110.clean-tmps remove quota.user/quota.group and
 the lost+found, assuming they exist?
 
 Evan
 
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sun Nov 16 04:56:39 PST 1997 
State-Changed-Why:  
Fixed in -current in rev 1.139 of rc and rev 1.134 of rc.conf. 
>Unformatted:
