projects
/
update-motd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af41fe7
)
make the update-motd process very nice, when not doing a --force run
author
Dustin Kirkland
<kirkland@canonical.com>
Mon, 10 Nov 2008 23:42:14 +0000
(
00:42
+0100)
committer
Dustin Kirkland
<kirkland@canonical.com>
Mon, 10 Nov 2008 23:42:14 +0000
(
00:42
+0100)
update-motd
patch
|
blob
|
history
diff --git
a/update-motd
b/update-motd
index 31a34fb2870b51a4430107514b0f7036d5ccf9f7..47ad99fa83e0bfa894db94fa3f92c99c97c61d09 100755
(executable)
--- a/
update-motd
+++ b/
update-motd
@@
-110,6
+110,12
@@
fi
# Make sure we clean up the motd.new lock file if we exit for any reason
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
+fi
+
# Start with the motd header
# This is identical to the motd-building code used in
# /etc/init.d/bootmisc.sh