Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 357137 - sys-process/dcron-4.4: /etc/cron.d/prune-cronstamps tries to delete dir /var/spool/cron/cronstamps
Summary: sys-process/dcron-4.4: /etc/cron.d/prune-cronstamps tries to delete dir /var/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on: 366991
Blocks:
  Show dependency tree
 
Reported: 2011-03-02 19:54 UTC by Junyx
Modified: 2011-05-16 20:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Junyx 2011-03-02 19:54:47 UTC
sys-process/dcron-4.4:
dcron comes with the crontab "/etc/cron.d/prune-cronstamps" which contains "@weekly ID=prune-cronstamps find /var/spool/cron/cronstamps -mtime +90 -atime +90 -delete".
The command "find /var/spool/cron/cronstamps -mtime +90 -atime +90 -delete" tries to delete the directory "/var/spool/cron/cronstamps" and not only files within it.


Reproducible: Always

Steps to Reproduce:
1. install and run dcron-4.4
2. wait >=90 days
3. see find complain that the directory "/var/spool/cron/cronstamps" is not empty and cannot be deleted

Actual Results:  
find should not try to delete the directory "/var/spool/cron/cronstamps".

Expected Results:  
find should only delete files within the directory "/var/spool/cron/cronstamps", not the dir itself.

Just change the last line in "/etc/cron.d/prune-cronstamps" into:
"@weekly ID=prune-cronstamps find /var/spool/cron/cronstamps -type f -mtime +90 -atime +90 -delete".
Now only files will be found and deleted.
Comment 1 Alec Moskvin 2011-04-08 20:17:13 UTC
I sent an email with the fix to Jim Pryor (dcron's maintainer) back in February, but he never responded :(
Comment 2 Ryoichiro Suzuki 2011-05-12 11:13:22 UTC
(In reply to comment #1)
> I sent an email with the fix to Jim Pryor (dcron's maintainer) back in
> February, but he never responded :(

Upstream seems to have fixed this problem in dcron 4.5.

dcron-4.5/extra/prune-cronstamps:
@weekly ID=prune-cronstamps find /var/spool/cron/cronstamps -type f -mtime +90 -atime +90 -delete
Comment 3 SpanKY gentoo-dev 2011-05-16 20:29:07 UTC
dcron-4.5 now in the tree