[debsums] 40/184: Use ionice while running the cronjob

Axel Beckert abe at deuxchevaux.org
Mon Mar 2 21:21:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository debsums.

commit a9737d254a3989de30e447ecb06055585628d73c
Author: Francois Marier <francois at debian.org>
Date:   Mon Sep 29 21:07:03 2008 +1300

    Use ionice while running the cronjob
---
 debian/changelog          | 3 ++-
 debian/debsums.cron.daily | 8 +++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a594a09..5311942 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,13 @@
 debsums (2.0.38) UNRELEASED; urgency=low
 
   * Fix the cronjob when the ignore file is empty or missing (closes: #499532)
+  * Use ionice to reduce the impact of having the cronjob running.
   * New Ukranian debconf translation
   * Updated Swedish debconf translation
   * Updated German debconf translation (closes: #500470)
   * Updated Japanese debconf translation (closes: #500466)
 
- -- Francois Marier <francois at debian.org>  Mon, 29 Sep 2008 11:14:40 +1300
+ -- Francois Marier <francois at debian.org>  Mon, 29 Sep 2008 21:06:38 +1300
 
 debsums (2.0.37) unstable; urgency=low
 
diff --git a/debian/debsums.cron.daily b/debian/debsums.cron.daily
index 669f60e..64a61b3 100755
--- a/debian/debsums.cron.daily
+++ b/debian/debsums.cron.daily
@@ -5,7 +5,13 @@ ignorefile="/etc/debsums-ignore"
 
 [ -x $debsums ] || exit 0
 
-$debsums -cs 2>&1 | egrep -vf "$ignorefile"
+# See ionice(1)
+if [ -x /usr/bin/ionice ] &&
+    /usr/bin/ionice -c3 true 2>/dev/null; then
+    IONICE="/usr/bin/ionice -c3"
+fi
+
+$IONICE $debsums -cs 2>&1 | egrep -vf "$ignorefile"
 
 # Exit with a normal status code even if errors (which could be ignored) were found
 exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/debsums.git



More information about the Pkg-perl-cvs-commits mailing list