Package: cron Version: 3.0pl1-120 Severity: minor Tags: patch Hi,
It was previously necessary to ensure that /etc/cron.daily/standard doesn't run in parallel, however this is no longer the case. After most of its original functionality has been split out, the only remaining task is to check the lost+found directories. This task is both non-blocking and read-only, so it can safely be be run in parallel, although this will almost certainly never happen in practice. The attached patch removes the logic responsible for doing the locking; it should get us one step closer to finally getting rid of this script. Best regards Alexander Kurtz
diff -Naur cron-3.0pl1.orig/debian/standard.daily cron-3.0pl1/debian/standard.daily --- cron-3.0pl1.orig/debian/standard.daily 2012-02-05 18:18:01.000000000 +0100 +++ cron-3.0pl1/debian/standard.daily 2012-02-05 18:20:40.837975093 +0100 @@ -8,24 +8,8 @@ # Start in the root filesystem, make SElinux happy cd / -LOCKFILE=/var/lock/cron.daily LOFO=lost+found -# When flock is available, avoid running more than once at a time -if `which flock >/dev/null`; then - exec 9> $LOCKFILE - if ! flock -x -n 9; then - cat <<EOF - -Unable to run /etc/cron.daily/standard because lockfile $LOCKFILE -acquisition failed. This probably means that the previous day's -instance is still running. Please check and correct if necessary. - -EOF - exit 1 - fi -fi - # Don't continue if user wants to skip lost+found check if [ -f /etc/default/cron ]; then . /etc/default/cron @@ -100,6 +84,3 @@ EOF echo $CONTENTS fi - -# Remove lock file (releasing lock) -rm -f $LOCKFILE
signature.asc
Description: This is a digitally signed message part