From 13d7f25c3032f2a3b2d3dad1531496df6d96e0da Mon Sep 17 00:00:00 2001
From: Dustin Kirkland <kirkland@canonical.com>
Date: Thu, 5 Mar 2009 11:04:02 -0600
Subject: [PATCH]   * update-motd: don't fail the entire script, if
 renice/ionice fail,     Bug #331921; ionice to 'idle' rather than
 'best-effort'

---
 debian/changelog | 7 ++++---
 update-motd      | 5 +++--
 2 files changed, 7 insertions(+), 5 deletions(-)

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 <kirkland@ubuntu.com>  Thu, 05 Mar 2009 08:09:59 -0600
+ -- Dustin Kirkland <kirkland@ubuntu.com>  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
-- 
2.30.2