diff options
author | Thilo Bangert <bangert@gentoo.org> | 2002-06-26 09:48:04 +0000 |
---|---|---|
committer | Thilo Bangert <bangert@gentoo.org> | 2002-06-26 09:48:04 +0000 |
commit | 127eb090c9f1fdf00214c9a5a0ef0fd5a77cfd2a (patch) | |
tree | 4d54aad703b79b3ff71658ef3c7c393ab116ca34 /sys-apps | |
parent | new snapshot (diff) | |
download | gentoo-2-127eb090c9f1fdf00214c9a5a0ef0fd5a77cfd2a.tar.gz gentoo-2-127eb090c9f1fdf00214c9a5a0ef0fd5a77cfd2a.tar.bz2 gentoo-2-127eb090c9f1fdf00214c9a5a0ef0fd5a77cfd2a.zip |
this reintroduces the deletion of cron touchfiles in run-crons, while fixing the original race
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/cronbase/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/cronbase/files/run-crons | 21 |
2 files changed, 29 insertions, 2 deletions
diff --git a/sys-apps/cronbase/ChangeLog b/sys-apps/cronbase/ChangeLog index a898f5da1cea..8e9473f36e00 100644 --- a/sys-apps/cronbase/ChangeLog +++ b/sys-apps/cronbase/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/cronbase # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/ChangeLog,v 1.4 2002/06/23 17:37:19 bangert Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/ChangeLog,v 1.5 2002/06/26 09:48:04 bangert Exp $ + + 23 Jun 2002; Thilo Bangert <bangert@gentoo.org> files/run-crons : + + rethought rewrite and fixed a race. thanks go to jnelseon and george + + +*cronbase-0.2 (24 Jun 2002) 23 Jun 2002; Thilo Bangert <bangert@gentoo.org> files/run-crons : @@ -10,6 +17,7 @@ moved lastrun to /var/spool/cron/lastrun + *cronbase-0.01 (19 Apr 2002) 19 Apr 2002; Thilo Bangert <bangert@gentoo.org> ChangeLog : diff --git a/sys-apps/cronbase/files/run-crons b/sys-apps/cronbase/files/run-crons index 7c4351ec56fe..614959443ce3 100644 --- a/sys-apps/cronbase/files/run-crons +++ b/sys-apps/cronbase/files/run-crons @@ -1,6 +1,6 @@ #!/bin/sh # -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/files/run-crons,v 1.5 2002/06/23 17:37:19 bangert Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/files/run-crons,v 1.6 2002/06/26 09:48:04 bangert Exp $ # # 23 Jun 2002; Jon Nelson <jnelson@gentoo.org> run-crons: # @@ -29,6 +29,25 @@ do test -d $CRONDIR || continue + if test -e /var/spool/cron/lastrun/cron.$BASE + then + case $BASE in + hourly) + #>= 65 min -=> +64 min + TIME="-cmin +64" ;; + daily) + #>= 1 day, 5 min -=> +1444 min + TIME="-cmin +1444" ;; + weekly) + #>= 1 week, 5 min -=> +10084 min + TIME="-cmin +10085" ;; + monthly) + #>= 30 days, 5 min -=> +43204 min + TIME="-cmin +43204" ;; + esac + find /var/spool/cron/lastrun/cron.$BASE $TIME -exec rm {} \; + fi + # if there is no touch file, make one then run the scripts if test ! -f /var/spool/cron/lastrun/cron.$BASE then |