diff options
author | Ciaran McCreesh <ciaranm@gentoo.org> | 2005-03-04 23:34:23 +0000 |
---|---|---|
committer | Ciaran McCreesh <ciaranm@gentoo.org> | 2005-03-04 23:34:23 +0000 |
commit | e0bfb24078f3b19fb20d3f6705e2fb4eb6ec3cef (patch) | |
tree | 1fcc136e12fb70e37bc1f758a6f549087f7e12f2 /sys-apps | |
parent | Move sys-apps/cronbase -> sys-process/cronbase (diff) | |
download | gentoo-2-e0bfb24078f3b19fb20d3f6705e2fb4eb6ec3cef.tar.gz gentoo-2-e0bfb24078f3b19fb20d3f6705e2fb4eb6ec3cef.tar.bz2 gentoo-2-e0bfb24078f3b19fb20d3f6705e2fb4eb6ec3cef.zip |
Move sys-apps/cronbase -> sys-process/cronbase
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/cronbase/ChangeLog | 108 | ||||
-rw-r--r-- | sys-apps/cronbase/Manifest | 12 | ||||
-rw-r--r-- | sys-apps/cronbase/cronbase-0.2.1-r3.ebuild | 28 | ||||
-rw-r--r-- | sys-apps/cronbase/cronbase-0.3.1.ebuild | 27 | ||||
-rw-r--r-- | sys-apps/cronbase/cronbase-0.3.ebuild | 28 | ||||
-rw-r--r-- | sys-apps/cronbase/files/README | 119 | ||||
-rw-r--r-- | sys-apps/cronbase/files/digest-cronbase-0.2.1-r3 | 0 | ||||
-rw-r--r-- | sys-apps/cronbase/files/digest-cronbase-0.3 | 0 | ||||
-rw-r--r-- | sys-apps/cronbase/files/digest-cronbase-0.3.1 | 0 | ||||
-rw-r--r-- | sys-apps/cronbase/files/run-crons-0.2.1 | 83 | ||||
-rw-r--r-- | sys-apps/cronbase/files/run-crons-0.3 | 96 | ||||
-rw-r--r-- | sys-apps/cronbase/files/run-crons-0.3.1 | 103 | ||||
-rw-r--r-- | sys-apps/cronbase/metadata.xml | 5 |
13 files changed, 0 insertions, 609 deletions
diff --git a/sys-apps/cronbase/ChangeLog b/sys-apps/cronbase/ChangeLog deleted file mode 100644 index b64c0bed3e10..000000000000 --- a/sys-apps/cronbase/ChangeLog +++ /dev/null @@ -1,108 +0,0 @@ -# ChangeLog for sys-apps/cronbase -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/ChangeLog,v 1.34 2004/10/08 12:15:33 ka0ttic Exp $ - - 08 Oct 2004; Aaron Walker <ka0ttic@gentoo.org> metadata.xml: - Updated metadata to reflect new cron herd. - - 18 Aug 2004; Aron Griffis <agriffis@gentoo.org> cronbase-0.3.1.ebuild: - stable everywhere - - 26 Jul 2004; Aron Griffis <agriffis@gentoo.org> files/run-crons-0.3.1: - Polish that locking 'til it gleams - -*cronbase-0.3.1 (25 Jul 2004) - - 25 Jul 2004; Aron Griffis <agriffis@gentoo.org> +files/run-crons-0.3.1, - +cronbase-0.3.1.ebuild: - Polish up locking code, thanks to Nahor for diagnosing the problems #58137 - - 29 Jun 2004; Aron Griffis <agriffis@gentoo.org> cronbase-0.3.ebuild: - stable everywhere - - 25 May 2004; Aron Griffis <agriffis@gentoo.org> files/run-crons-0.3: - Fix bash typo in run-crons-0.3 - -*cronbase-0.3 (24 May 2004) - - 24 May 2004; Aron Griffis <agriffis@gentoo.org> -files/run-crons, - -cronbase-0.2.1-r2.ebuild, cronbase-0.2.1-r3.ebuild, +cronbase-0.3.ebuild: - Fix bug 45155 (run-crons and /var/spool/cron/lastrun/lock problems) by - re-writing the locking code to be non-racy - - 08 Apr 2004; Joshua Kinard <kumba@gentoo.org> cronbase-0.2.1-r2.ebuild, - cronbase-0.2.1-r3.ebuild: - Marked stable on mips. - - 08 Apr 2004; Luca Barbato <lu_zero@gentoo.org> : - Marked ppc - - 07 Apr 2004; <kloeri@gentoo.org> cronbase-0.2.1-r3.ebuild: - Stable on Alpha. - - 29 Mar 2004; Jon Portnoy <avenj@gentoo.org> cronbase-0.2.1-r3.ebuild : - Stable on AMD64 - - 29 Mar 2004; Gustavo Zacarias <gustavoz@gentoo.org> - cronbase-0.2.1-r3.ebuild: - stable on sparc - - 26 Mar 2004; Seemant Kulleen <seemant@gentoo.org> cronbase-0.2.1-r3.ebuild: - move to stable x86 - - 26 Dec 2003; Guy Martin <gmsoft@gentoo.org> cronbase-0.2.1-r3.ebuild: - Marked stable on hppa. - -*cronbase-0.2.1-r3 (19 Nov 2003) - - 19 Nov 2003; Preston A. Elder <prez@gentoo.org> run-crons : - Added code to ensure only one run-crons instance runs at once. - -*cronbase-0.2.1-r2 (31 Jan 2003) - - 17 Sep 2003; Jon Portnoy <avenj@gentoo.org> cronbase-0.2.1-r2.ebuild : - ia64 keywords. - - 20 Feb 2003; Zach Welch <zwelch@gentoo.org> cronbase-0.2.1-r2.ebuild : - Added arm to keywords. - - 07 Feb 2003; Guy Martin <gmsoft@gentoo.org> cronbase-0.2.1-r2.ebuild : - Added hppa to keywords. - - 31 Jan 2003; Preston A. Elder <prez@gentoo.org> run-crons : - Chaged month delay from 30 to 31 days, as per Bug #14862 - -*cronbase-0.2.1-r1 (13 Nov 2002) - - 22 Jan 2003; Mike Frysinger <vapier@gentoo.org> : - Removed duplicate keepdir func definition - - 19 Jan 2003; Jan Seidel <tuxus@gentoo.org> : - Added mips to keywords - - 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords - - 13 Nov 2002; Donny Davies <woodchip@gentoo.org> run-crons : Fix #10409. - -*cronbase-0.2.1 (27 Jun 2002) - - 22 Jan 2003; Mike Frysinger <vapier@gentoo.org> : - Removed duplicate keepdir func definition - - 14 Jul 2002; phoen][x <phoenix@gentoo.org> cronbase-0.2.1.ebuild : - Added KEYWORDS, SLOT. - - 26 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 : - minor fixors/cleanups - suggested by jon nelson - - 20 Apr 2002; Thilo Bangert <bangert@gentoo.org> files/run-crons : - moved lastrun to /var/spool/cron/lastrun - -*cronbase-0.01 (19 Apr 2002) - - 19 Apr 2002; Thilo Bangert <bangert@gentoo.org> ChangeLog : initial release. diff --git a/sys-apps/cronbase/Manifest b/sys-apps/cronbase/Manifest deleted file mode 100644 index 9827c33da323..000000000000 --- a/sys-apps/cronbase/Manifest +++ /dev/null @@ -1,12 +0,0 @@ -MD5 bbe58f02b6d13a6111d845e71599d006 ChangeLog 3589 -MD5 e65d81e57db2b515afec8ba4d23a5e0c cronbase-0.3.ebuild 793 -MD5 2140f653d8a39eaac8c70f4ac662ff68 cronbase-0.2.1-r3.ebuild 799 -MD5 ac2122abe185587e320c615bde9b08a1 cronbase-0.3.1.ebuild 795 -MD5 9c8fdf815ce980c230d763b496d4d088 metadata.xml 158 -MD5 aec64f4f974f1916af15c1e7e3dbda2c files/README 2862 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-cronbase-0.3 0 -MD5 e5e6072141927cbd370b6daa5d53fbb7 files/run-crons-0.2.1 1963 -MD5 3535c6f09818ef0ae04aaf7ddf19f39e files/run-crons-0.3 2642 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-cronbase-0.2.1-r3 0 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-cronbase-0.3.1 0 -MD5 0dfa648811055056b72446ce55e64b38 files/run-crons-0.3.1 2800 diff --git a/sys-apps/cronbase/cronbase-0.2.1-r3.ebuild b/sys-apps/cronbase/cronbase-0.2.1-r3.ebuild deleted file mode 100644 index ebe1b9f7642f..000000000000 --- a/sys-apps/cronbase/cronbase-0.2.1-r3.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/cronbase-0.2.1-r3.ebuild,v 1.14 2004/06/24 22:01:42 agriffis Exp $ - -IUSE="" - -DESCRIPTION="base for all cron ebuilds" -HOMEPAGE="http://www.gentoo.org/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="x86 ppc ppc64 sparc mips alpha arm hppa amd64 ia64 s390" - -src_install() { - exeinto /usr/sbin - newexe ${FILESDIR}/run-crons-${PV} run-crons || die - - diropts -m0750; keepdir /etc/cron.hourly - diropts -m0750; keepdir /etc/cron.daily - diropts -m0750; keepdir /etc/cron.weekly - diropts -m0750; keepdir /etc/cron.monthly - - diropts -m0750 -o root -g cron; keepdir /var/spool/cron - - diropts -m0750; keepdir /var/spool/cron/lastrun - - dodoc ${FILESDIR}/README -} diff --git a/sys-apps/cronbase/cronbase-0.3.1.ebuild b/sys-apps/cronbase/cronbase-0.3.1.ebuild deleted file mode 100644 index 97b7ca99aede..000000000000 --- a/sys-apps/cronbase/cronbase-0.3.1.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/cronbase-0.3.1.ebuild,v 1.3 2004/11/12 14:23:29 vapier Exp $ - -DESCRIPTION="base for all cron ebuilds" -HOMEPAGE="http://www.gentoo.org/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc x86" -IUSE="" - -src_install() { - exeinto /usr/sbin - newexe ${FILESDIR}/run-crons-${PV} run-crons || die - - diropts -m0750; keepdir /etc/cron.hourly - diropts -m0750; keepdir /etc/cron.daily - diropts -m0750; keepdir /etc/cron.weekly - diropts -m0750; keepdir /etc/cron.monthly - - diropts -m0750 -o root -g cron; keepdir /var/spool/cron - - diropts -m0750; keepdir /var/spool/cron/lastrun - - dodoc ${FILESDIR}/README -} diff --git a/sys-apps/cronbase/cronbase-0.3.ebuild b/sys-apps/cronbase/cronbase-0.3.ebuild deleted file mode 100644 index 58f84d41ce3a..000000000000 --- a/sys-apps/cronbase/cronbase-0.3.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/cronbase-0.3.ebuild,v 1.3 2004/06/30 03:36:37 agriffis Exp $ - -IUSE="" - -DESCRIPTION="base for all cron ebuilds" -HOMEPAGE="http://www.gentoo.org/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="x86 ppc ppc64 sparc mips alpha arm hppa amd64 ia64 s390" - -src_install() { - exeinto /usr/sbin - newexe ${FILESDIR}/run-crons-${PV} run-crons || die - - diropts -m0750; keepdir /etc/cron.hourly - diropts -m0750; keepdir /etc/cron.daily - diropts -m0750; keepdir /etc/cron.weekly - diropts -m0750; keepdir /etc/cron.monthly - - diropts -m0750 -o root -g cron; keepdir /var/spool/cron - - diropts -m0750; keepdir /var/spool/cron/lastrun - - dodoc ${FILESDIR}/README -} diff --git a/sys-apps/cronbase/files/README b/sys-apps/cronbase/files/README deleted file mode 100644 index 835665d773d6..000000000000 --- a/sys-apps/cronbase/files/README +++ /dev/null @@ -1,119 +0,0 @@ - -$Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/files/README,v 1.6 2004/07/18 04:32:45 dragonheart Exp $ - -22 Apr 2oo2; Thilo Bangert <bangert@gentoo.org> - -initial release - - - -The Gentoo Linux Cron README -============================ - -Subject: New Cron Layout -Date: Mon, 22 Apr 2002 21:35:26 +0200 -From: Thilo Bangert <bangert@gentoo.org> -To: gentoo-dev@gentoo.org, gentoo-announce@gentoo.org, -gentoo-user@gentoo.org, gentoo-newbies@gentoo.org - - Hi, - -I have just unmasked - - sys-apps/cronbase-0.01 - sys-apps/dcron-2.7-r9 - sys-apps/fcron-2.0.0-r1 - sys-apps/vcron-3.0.1-r1 - -Users of - - sys-apps/dcron - sys-apps/fcron (or app-admin/fcron ) - sys-apps/vcron - -should read the following before updating to the new cron layout. - - -Features --------- - -The new cron layout incorporates the following features: - - - to be able to use cron, a user must be part of the "cron" group. - - - cron spool files are located at /var/spool/cron/ for all cron's - - - all crons run /etc/cron.{hourly|daily|weekly|monthly} (fcron and - dcron users see notice below). - - - all crons PROVIDE=virtual/cron and future ebuilds will make use of - this. Ebuild developers are encourged to use it where applicable. - - - max one cron per system. - - - dcron is the Gentoo Linux "default" (ie. dcron gets installed if - something depends on virtual/cron and no cron has been installed - yet). - - -Upgrade instructions --------------------- - -sys-apps/dcron: - - NOTE: fcron has been moved from the app-admin category to the - sys-apps category. - - to install the new dcron, do - # emerge --pretend sys-apps/dcron - # emerge sys-apps/dcron - - NOTE: to make use of /etc/cron.{hourly|daily|weekly|monthly} the root - crontab must include the contents of /etc/crontab. - - # crontab /etc/crontab - - !! This will REPLACE root's current crontab !! - - -sys-apps/fcron: - - to install the new fcron, do - # emerge --pretend sys-apps/fcron - # emerge sys-apps/fcron - - The default location for crontabs for fcron has been changed to - /var/spool/cron/fcrontabs. To make use of previous crontabs, copy - them to the new location. Make sure your new /etc/fcron/fcron.conf - reflects this. - - NOTE: to make use of /etc/cron.{hourly|daily|weekly|monthly} the root - crontab must include the contents of /etc/crontab. - - # crontab /etc/crontab - - !! This will REPLACE root's current crontab !! - - NEW: To be able to use cron as a user, the user must be part of the - "cron" group. - - -sys-apps/vcron: - - to install the new vcron, do - # emerge --pretend sys-apps/vcron - # emerge sys-apps/vcron - - NEW: To be able to use cron as a user, the user must be part of the - "cron" group. - - -Although the new layout has been tested, bugs may be present. -Please report them on http://bugs.gentoo.org and assign them -to bangert@gentoo.org. - -Thank you. - -regards -Thilo Bangert <bangert@gentoo.org> - diff --git a/sys-apps/cronbase/files/digest-cronbase-0.2.1-r3 b/sys-apps/cronbase/files/digest-cronbase-0.2.1-r3 deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/sys-apps/cronbase/files/digest-cronbase-0.2.1-r3 +++ /dev/null diff --git a/sys-apps/cronbase/files/digest-cronbase-0.3 b/sys-apps/cronbase/files/digest-cronbase-0.3 deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/sys-apps/cronbase/files/digest-cronbase-0.3 +++ /dev/null diff --git a/sys-apps/cronbase/files/digest-cronbase-0.3.1 b/sys-apps/cronbase/files/digest-cronbase-0.3.1 deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/sys-apps/cronbase/files/digest-cronbase-0.3.1 +++ /dev/null diff --git a/sys-apps/cronbase/files/run-crons-0.2.1 b/sys-apps/cronbase/files/run-crons-0.2.1 deleted file mode 100644 index 773c39555df1..000000000000 --- a/sys-apps/cronbase/files/run-crons-0.2.1 +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh -# -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/files/run-crons-0.2.1,v 1.2 2004/07/18 04:32:45 dragonheart Exp $ -# -# 23 Jun 2002; Jon Nelson <jnelson@gentoo.org> run-crons: -# -# fixed a race condition, where cron jobs and run-crons wanted to delete -# touch files -# -# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org> run-crons: -# -# moved lastrun directory to /var/spool/cron/lastrun -# -# Author: Achim Gottinger <achim@gentoo.org> -# -# Mostly copied from SuSE -# -# this script looks into /etc/cron.[hourly|daily|weekly|monthly] -# for scripts to be executed. The info about last run is stored in -# /var/spool/cron/lastrun - -mkdir -p /var/spool/cron/lastrun - -# Make sure its not running multiple instances at once. -if test -f /var/spool/cron/lastrun/lock -then - cronpid=`cat /var/spool/cron/lastrun/lock` - if `kill -0 $cronpid >/dev/null 2>&1` - then - exit 0 - fi -fi - -echo "$$" >/var/spool/cron/lastrun/lock - -for BASE in hourly daily weekly monthly -do - CRONDIR=/etc/cron.${BASE} - - test -d $CRONDIR || continue - - if test -e /var/spool/cron/lastrun/cron.$BASE - then - case $BASE in - hourly) - #>= 1 hour, 5 min -=> +65 min - TIME="-cmin +65" ;; - daily) - #>= 1 day, 5 min -=> +1445 min - TIME="-cmin +1445" ;; - weekly) - #>= 1 week, 5 min -=> +10085 min - TIME="-cmin +10085" ;; - monthly) - #>= 31 days, 5 min -=> +44645 min - TIME="-cmin +44645" ;; - esac - find /var/spool/cron/lastrun -name 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 - - touch /var/spool/cron/lastrun/cron.$BASE - - set +e - for SCRIPT in $CRONDIR/* - do - test -d $SCRIPT && continue - if test -x $SCRIPT ; then - $SCRIPT - fi - done - fi -done - -# Remove lock, we're done. -rm -f /var/spool/cron/lastrun/lock - -touch /var/spool/cron/lastrun -find /var/spool/cron/lastrun -newer /var/spool/cron/lastrun -exec /bin/rm -f {} \; - diff --git a/sys-apps/cronbase/files/run-crons-0.3 b/sys-apps/cronbase/files/run-crons-0.3 deleted file mode 100644 index d4f65ee74270..000000000000 --- a/sys-apps/cronbase/files/run-crons-0.3 +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash -# -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/files/run-crons-0.3,v 1.3 2004/07/18 04:32:45 dragonheart Exp $ -# -# -# 06 May 2004; Aron Griffis <agriffis@gentoo.org> run-crons: -# Make the locking actually work. The old code was racy. -# Thanks to Mathias Gumz in bug 45155 for some cleanups. -# -# 23 Jun 2002; Jon Nelson <jnelson@gentoo.org> run-crons: -# fixed a race condition, where cron jobs and run-crons wanted to -# delete touch files -# -# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org> run-crons: -# moved lastrun directory to /var/spool/cron/lastrun -# -# Author: Achim Gottinger <achim@gentoo.org> -# -# Mostly copied from SuSE -# -# this script looks into /etc/cron.[hourly|daily|weekly|monthly] -# for scripts to be executed. The info about last run is stored in -# /var/spool/cron/lastrun - -LOCKDIR=/var/spool/cron/lastrun -LOCKFILE=${LOCKDIR}/lock - -mkdir -p ${LOCKDIR} - -# Make sure we're not running multiple instances at once. -# Try twice to lock, otherwise give up. -for ((i = 0; i < 2; i = i + 1)); do - ln -sn $$ ${LOCKFILE} 2>/dev/null - if [[ $? != 0 ]]; then - # lock failed, check for a running process. - # handle both old- and new-style locking. - cronpid=$(readlink ${LOCKFILE} 2>/dev/null || - cat ${LOCKFILE} 2>/dev/null) - if [[ $? == 0 ]]; then - if kill -0 ${cronpid} 2>/dev/null; then - # whoa, another process is really running - exit 0 - else - rm -f ${LOCKFILE} - fi - fi - fi -done - -# Set a trap to remove the lockfile when we're finished -trap "rm -f ${LOCKFILE}" 0 1 2 3 15 - - -for BASE in hourly daily weekly monthly -do - CRONDIR=/etc/cron.${BASE} - - test -d $CRONDIR || continue - - if [ -e ${LOCKDIR}/cron.$BASE ] - then - case $BASE in - hourly) - #>= 1 hour, 5 min -=> +65 min - TIME="-cmin +65" ;; - daily) - #>= 1 day, 5 min -=> +1445 min - TIME="-cmin +1445" ;; - weekly) - #>= 1 week, 5 min -=> +10085 min - TIME="-cmin +10085" ;; - monthly) - #>= 31 days, 5 min -=> +44645 min - TIME="-cmin +44645" ;; - esac - find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; - fi - - # if there is no touch file, make one then run the scripts - if [ ! -e ${LOCKDIR}/cron.$BASE ] - then - touch ${LOCKDIR}/cron.$BASE - - set +e - for SCRIPT in $CRONDIR/* - do - if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then - $SCRIPT - fi - done - fi -done - -# Clean out bogus cron.$BASE files with future times -touch ${LOCKDIR} -find ${LOCKDIR} -newer ${LOCKDIR} -exec /bin/rm -f {} \; diff --git a/sys-apps/cronbase/files/run-crons-0.3.1 b/sys-apps/cronbase/files/run-crons-0.3.1 deleted file mode 100644 index dfedbabcc496..000000000000 --- a/sys-apps/cronbase/files/run-crons-0.3.1 +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/bash -# -# $Header: /var/cvsroot/gentoo-x86/sys-apps/cronbase/files/run-crons-0.3.1,v 1.2 2004/07/26 23:12:36 agriffis Exp $ -# -# -# 06 May 2004; Aron Griffis <agriffis@gentoo.org> run-crons: -# Make the locking actually work. The old code was racy. -# Thanks to Mathias Gumz in bug 45155 for some cleanups. -# -# 23 Jun 2002; Jon Nelson <jnelson@gentoo.org> run-crons: -# fixed a race condition, where cron jobs and run-crons wanted to -# delete touch files -# -# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org> run-crons: -# moved lastrun directory to /var/spool/cron/lastrun -# -# Author: Achim Gottinger <achim@gentoo.org> -# -# Mostly copied from SuSE -# -# this script looks into /etc/cron.[hourly|daily|weekly|monthly] -# for scripts to be executed. The info about last run is stored in -# /var/spool/cron/lastrun - -LOCKDIR=/var/spool/cron/lastrun -LOCKFILE=${LOCKDIR}/lock - -mkdir -p ${LOCKDIR} - -# Make sure we're not running multiple instances at once. -# Try twice to lock, otherwise give up. -for ((i = 0; i < 2; i = i + 1)); do - ln -sn $$ ${LOCKFILE} 2>/dev/null && break - - # lock failed, check for a running process. - # handle both old- and new-style locking. - cronpid=$(readlink ${LOCKFILE} 2>/dev/null) || - cronpid=$(cat ${LOCKFILE} 2>/dev/null) || - continue # lockfile disappeared? try again - - # better than kill -0 because we can verify that it's really - # another run-crons process - if [[ $(</proc/${cronpid}/cmdline) == $(</proc/$$/cmdline) ]] 2>/dev/null; then - # whoa, another process is really running - exit 0 - else - rm -f ${LOCKFILE} - fi -done - -# Check to make sure locking was successful -if [[ ! -L ${LOCKFILE} ]]; then - echo "Can't create or read existing ${LOCKFILE}, giving up" - exit 1 -fi - -# Set a trap to remove the lockfile when we're finished -trap "rm -f ${LOCKFILE}" 0 1 2 3 15 - - -for BASE in hourly daily weekly monthly -do - CRONDIR=/etc/cron.${BASE} - - test -d $CRONDIR || continue - - if [ -e ${LOCKDIR}/cron.$BASE ] - then - case $BASE in - hourly) - #>= 1 hour, 5 min -=> +65 min - TIME="-cmin +65" ;; - daily) - #>= 1 day, 5 min -=> +1445 min - TIME="-cmin +1445" ;; - weekly) - #>= 1 week, 5 min -=> +10085 min - TIME="-cmin +10085" ;; - monthly) - #>= 31 days, 5 min -=> +44645 min - TIME="-cmin +44645" ;; - esac - find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; - fi - - # if there is no touch file, make one then run the scripts - if [ ! -e ${LOCKDIR}/cron.$BASE ] - then - touch ${LOCKDIR}/cron.$BASE - - set +e - for SCRIPT in $CRONDIR/* - do - if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then - $SCRIPT - fi - done - fi -done - -# Clean out bogus cron.$BASE files with future times -touch ${LOCKDIR} -find ${LOCKDIR} -newer ${LOCKDIR} -exec /bin/rm -f {} \; diff --git a/sys-apps/cronbase/metadata.xml b/sys-apps/cronbase/metadata.xml deleted file mode 100644 index 3f399e92bcff..000000000000 --- a/sys-apps/cronbase/metadata.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <herd>cron</herd> -</pkgmetadata> |