Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 1669 Details for
Bug 3966
/usr/sbin/run-crons needs minor fixup
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
a patch to run-crons
run-crons.diff (text/plain), 1.63 KB, created by
Jon Nelson (RETIRED)
on 2002-06-21 11:48:11 UTC
(
hide
)
Description:
a patch to run-crons
Filename:
MIME Type:
Creator:
Jon Nelson (RETIRED)
Created:
2002-06-21 11:48:11 UTC
Size:
1.63 KB
patch
obsolete
>--- gentoo-x86/sys-apps/cronbase/files/run-crons Mon May 13 21:27:02 2002 >+++ /usr/sbin/run-crons Fri Jun 21 11:46:55 2002 >@@ -19,23 +19,30 @@ > > # > >-for CRONDIR in /etc/cron.{hourly,daily,weekly,monthly} >+for BASE in hourly daily weekly monthly > do >- >+ CRONDIR=/etc/cron.${BASE} >+ > test -d $CRONDIR || continue >- BASE=${CRONDIR##*/} >- test -e /var/spool/cron/lastrun/$BASE && { >+ # if the touch file is older than {hourly,daily,...} remove it >+ # Why is this in here at all? Don't the cron jobs from /etc/crontab >+ # take care of this for us? >+ if test -f /var/spool/cron/lastrun/$BASE >+ then > > case $BASE in >- cron.hourly) TIME="-cmin +60 -or -cmin 60" ;; >- cron.daily) TIME="-ctime +1 -or -ctime 1" ;; >- cron.weekly) TIME="-ctime +7 -or -ctime 7" ;; >- cron.monthly) TIME="-ctime +30 -or -ctime 30" ;; >+ cron.hourly) TIME="-cmin +59" ;; >+ cron.daily) TIME="-ctime +0" ;; >+ cron.weekly) TIME="-ctime +6" ;; >+ cron.monthly) TIME="-ctime +29" ;; > esac >- eval find /var/spool/cron/lastrun/$BASE $TIME | \ >- xargs --no-run-if-empty rm >- } >- if test ! -e /var/spool/cron/lastrun/$BASE ; then >+ find /var/spool/cron/lastrun/$BASE $TIME -exec /bin/rm -f {} \; >+ fi >+ >+ # if there is no touch file, make one then run the scripts >+ if test ! -f /var/spool/cron/lastrun/$BASE >+ then >+ > touch /var/spool/cron/lastrun/$BASE > > set +e >@@ -52,6 +59,5 @@ > # > > touch /var/spool/cron/lastrun >-find /var/spool/cron/lastrun -newer /var/spool/cron/lastrun | \ >- xargs --no-run-if-empty rm >+find /var/spool/cron/lastrun -newer /var/spool/cron/lastrun -exec /bin/rm -f {} \; > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 3966
: 1669 |
1703
|
1745