diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-06-24 20:23:45 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-06-24 20:23:45 +0000 |
commit | 5ab18ef11fc2ac0622c6ef6182e1d775b9cba0e1 (patch) | |
tree | 4f05cfd16091face00ac925780b1d3ab15f0ac43 /sys-process | |
parent | Fixed $ROOT abuse (bug #167271) (diff) | |
download | historical-5ab18ef11fc2ac0622c6ef6182e1d775b9cba0e1.tar.gz historical-5ab18ef11fc2ac0622c6ef6182e1d775b9cba0e1.tar.bz2 historical-5ab18ef11fc2ac0622c6ef6182e1d775b9cba0e1.zip |
using consistent coding style
Package-Manager: portage-2.1.3_rc5
Diffstat (limited to 'sys-process')
-rw-r--r-- | sys-process/cronbase/Manifest | 18 | ||||
-rwxr-xr-x | sys-process/cronbase/files/run-crons-0.3.2 | 69 |
2 files changed, 47 insertions, 40 deletions
diff --git a/sys-process/cronbase/Manifest b/sys-process/cronbase/Manifest index 053ee1ff9fda..0861d5627aec 100644 --- a/sys-process/cronbase/Manifest +++ b/sys-process/cronbase/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX run-crons-0.2.1 1962 RMD160 1057460dae488e0382a6ebb7a5b4d8f6039c7686 SHA1 88e1c9be8aee40fca588691b91f3b869ee64ca3e SHA256 6b303e34b0c016ed05ea892a5aea68c70f66e146b5896c8aa96b9c99da12b9ce MD5 8a5efc0f1ab99d6942692ea684cd72c5 files/run-crons-0.2.1 1962 RMD160 1057460dae488e0382a6ebb7a5b4d8f6039c7686 files/run-crons-0.2.1 1962 @@ -10,10 +13,10 @@ AUX run-crons-0.3.1 2802 RMD160 84733d8e81ba3556f7678d1e0cea5d98f44373cf SHA1 bd MD5 e97f3765fe2a786526128816cd5d5d11 files/run-crons-0.3.1 2802 RMD160 84733d8e81ba3556f7678d1e0cea5d98f44373cf files/run-crons-0.3.1 2802 SHA256 92c392daf47b967e17cfef7ffe28eacab79e3e99dc232f718335f24615443444 files/run-crons-0.3.1 2802 -AUX run-crons-0.3.2 3076 RMD160 772d51fb452c2ed1db289bc3e673718ffec2d02b SHA1 b2cd1b187e68fc09a3d5286ae6378c37e86be67f SHA256 cfec44238fa168b7835b883d192d65fa787e1f3d0ec9153c8cd82cee5b8c0817 -MD5 1e8ba0da3984335e921892a8176acb27 files/run-crons-0.3.2 3076 -RMD160 772d51fb452c2ed1db289bc3e673718ffec2d02b files/run-crons-0.3.2 3076 -SHA256 cfec44238fa168b7835b883d192d65fa787e1f3d0ec9153c8cd82cee5b8c0817 files/run-crons-0.3.2 3076 +AUX run-crons-0.3.2 2982 RMD160 356b881d39f2ee4be23b688487044eee31c605ec SHA1 0bad7320dc22b4032541e9304a186700fd6edf2b SHA256 a9e6f0a4a73c582ce9417c57ab14545feddd83ac911c5e51c30de7237568f1e7 +MD5 5499c1e73719f4aa2ab956d4a6c80b83 files/run-crons-0.3.2 2982 +RMD160 356b881d39f2ee4be23b688487044eee31c605ec files/run-crons-0.3.2 2982 +SHA256 a9e6f0a4a73c582ce9417c57ab14545feddd83ac911c5e51c30de7237568f1e7 files/run-crons-0.3.2 2982 EBUILD cronbase-0.2.1-r3.ebuild 773 RMD160 7652367e4e094c49609c9751d2582f107a6ff7e4 SHA1 d47446f865a65c7e740a93ea6cf07a54235b9959 SHA256 7a8c627b92f4b73b726949e94609546d67b7a9a5c6682971047a221b0654a63d MD5 cf37881d3c2669b64cca6288bd10f4b2 cronbase-0.2.1-r3.ebuild 773 RMD160 7652367e4e094c49609c9751d2582f107a6ff7e4 cronbase-0.2.1-r3.ebuild 773 @@ -50,3 +53,10 @@ SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/di MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-cronbase-0.3.2 1 RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-cronbase-0.3.2 1 SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-cronbase-0.3.2 1 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.4 (GNU/Linux) + +iD8DBQFGftLXp/wUKkr7RBoRAtI9AJ4wp6ekFf4JmhEU7TL97sNZpjmvpQCgiqnw +rmZb7xRGTVW5wXWV0hewR/k= +=DyMN +-----END PGP SIGNATURE----- diff --git a/sys-process/cronbase/files/run-crons-0.3.2 b/sys-process/cronbase/files/run-crons-0.3.2 index d2b3631c7428..092553967c25 100755 --- a/sys-process/cronbase/files/run-crons-0.3.2 +++ b/sys-process/cronbase/files/run-crons-0.3.2 @@ -1,6 +1,6 @@ #!/bin/bash # -# $Header: /var/cvsroot/gentoo-x86/sys-process/cronbase/files/run-crons-0.3.2,v 1.1 2005/03/09 12:51:34 ka0ttic Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/cronbase/files/run-crons-0.3.2,v 1.2 2007/06/24 20:23:45 vapier Exp $ # # 08 Mar 2005; Aaron Walker <ka0ttic@gentoo.org> run-crons: # Ignore the error messages from find caused by race conditions, since @@ -34,7 +34,7 @@ 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 + ln -sn $$ ${LOCKFILE} 2>/dev/null && break # lock failed, check for a running process. # handle both old- and new-style locking. @@ -62,44 +62,41 @@ fi trap "rm -f ${LOCKFILE}" 0 1 2 3 15 -for BASE in hourly daily weekly monthly -do - CRONDIR=/etc/cron.${BASE} +for BASE in hourly daily weekly monthly ; do + CRONDIR=/etc/cron.${BASE} - test -d $CRONDIR || continue + 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 {} \; &>/dev/null || true - fi + 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 - # if there is no touch file, make one then run the scripts - if [ ! -e ${LOCKDIR}/cron.$BASE ] - then - touch ${LOCKDIR}/cron.$BASE + find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; &>/dev/null || true + 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 + 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 |