Bug 23805

Summary: periodic/daily/100.clean-disks doesn't remove files
Product: Base System Reporter: Norbert Papke <npapke>
Component: confAssignee: Brian Somers <brian>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Norbert Papke 2000-12-23 18:40:01 UTC
The periodic clean-disk script doesn't correctly find the files
to be automatically deleted.  The script incorrectly ANDs the
file patterns when they should be ORed.

Fix: 

When generating the $args file pattern, ensure that -o is inserted
between arguments.  Email me for diffs, if required.
How-To-Repeat: Enable periodic clean-disk with more than one file pattern.
Comment 1 npapke 2000-12-24 00:12:24 UTC
Should have included the diffs in the PR:

--- /usr/src/etc/periodic/daily/100.clean-disks Tue Sep 26 18:39:56 2000

+++ /etc/periodic/daily/100.clean-disks Sat Dec 23 16:08:55 2000
@@ -27,10 +27,12 @@
            rc=2
        else
            echo ""
-           echo "Removing old temporary files:"
+           echo "Cleaning disk:"
            set -f noglob
            args="$args "`echo " ${daily_clean_disks_files% }" |
-               sed 's/[        ][      ]*/ -name /g'`
+               sed 's/[        ][      ]*/ -o -name /g'`
+           args=`echo " $args" |
+               sed 's/-o//`

            case "$daily_clean_tmps_verbose" in
                [Yy][Ee][Ss])
Comment 2 Brian Somers freebsd_committer freebsd_triage 2000-12-24 03:22:56 UTC
State Changed
From-To: open->feedback

Fixed in -current, I'll MFC in two weeks given no problems. 


Comment 3 Brian Somers freebsd_committer freebsd_triage 2000-12-24 03:22:56 UTC
Responsible Changed
From-To: freebsd-bugs->brian

The periodic stuff is mostly my fault.
Comment 4 Brian Somers freebsd_committer freebsd_triage 2001-02-20 22:33:29 UTC
State Changed
From-To: feedback->closed

MFC'd on Jan 7 (oops - I forgot to close the pr!)