From: Dustin Kirkland Date: Thu, 5 Mar 2009 17:04:02 +0000 (-0600) Subject: * update-motd: don't fail the entire script, if renice/ionice fail, X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13d7f25c3032f2a3b2d3dad1531496df6d96e0da;p=update-motd.git * update-motd: don't fail the entire script, if renice/ionice fail, Bug #331921; ionice to 'idle' rather than 'best-effort' --- diff --git a/debian/changelog b/debian/changelog index 7356345..f0a3887 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -update-motd (1.11) unreleased; urgency=low +update-motd (1.11) jaunty; urgency=low - * + * update-motd: don't fail the entire script, if renice/ionice fail, + LP: #331921; ionice to 'idle' rather than 'best-effort' - -- Dustin Kirkland Thu, 05 Mar 2009 08:09:59 -0600 + -- Dustin Kirkland Thu, 05 Mar 2009 10:51:26 -0600 update-motd (1.10) jaunty; urgency=low diff --git a/update-motd b/update-motd index 47ad99f..7a4219b 100755 --- a/update-motd +++ b/update-motd @@ -112,8 +112,9 @@ trap "rm -f $NEW 2>/dev/null || true" EXIT HUP INT QUIT TERM if [ "$FORCE" != "1" ]; then # Be *really* nice, if we're running in the background (not forced) - renice 10 $$ >/dev/null - ionice -c2 -n7 -p $$ >/dev/null + # But don't fail the script if we're not able to 'nice' + renice 10 $$ >/dev/null &2>1 || true + ionice -c3 -p $$ >/dev/null &2>1 || true fi # Start with the motd header