Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2001 16:10:44 -0700 (PDT)
From:      NIIMI Satoshi <sa2c@and.or.jp>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/28355: /etc/periodic/daily/110.clean-tmps reports incorrect result
Message-ID:  <200106222310.f5MNAiQ83423@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         28355
>Category:       misc
>Synopsis:       /etc/periodic/daily/110.clean-tmps reports incorrect result
>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:   Fri Jun 22 16:20:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     NIIMI Satoshi
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
>Environment:
FreeBSD berkeley.us.and.or.jp 4.3-STABLE FreeBSD 4.3-STABLE #2: Thu Jun 21 18:28:33 JST 2001     sa2c@berkeley.us.and.or.jp:/usr/obj/usr/src/sys/BERKELEY  i386

>Description:
/etc/periodic/daily/110.clean-tmps reports like
>How-To-Repeat:
Insert 'daily_clean_disks_enable="YES"' in /etc/periodic.conf and type the following commands:
mkdir -p /tmp/path/to/dir
touch /tmp/path/to/dir/file
touch -t 19700102 /tmp/path/to/dir
/etc/periodic/daily/110.clean-tmps

>Fix:
diff -u -r1.10 110.clean-tmps
--- 110.clean-tmps      2000/09/14 17:19:10     1.10
+++ 110.clean-tmps      2001/06/22 22:46:34
@@ -41,7 +41,7 @@
                do
                    [ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && {
                        find -d . -type f $args -delete $print
-                       find -d . ! -name . -type d -mtime \
+                       find -d . ! -name . -type d -empty -mtime \
                            +$daily_clean_tmps_days -delete $print
                    } | sed "s,^\\.,  $dir,"
                done | tee /dev/stderr | wc -l)

>Release-Note:
>Audit-Trail:
>Unformatted:
 >Removing old temporary files:
 >  /tmp/path/to/file
 >  /tmp/path/to/dir
 but if "/tmp/path/to/dir" is directory and is not empy, it is not deleted.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106222310.f5MNAiQ83423>