From 611027a8adc958aaa87c3a97dfce5d07a5b51c7e Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 11 Nov 2008 00:42:14 +0100 Subject: [PATCH] make the update-motd process very nice, when not doing a --force run --- update-motd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/update-motd b/update-motd index 31a34fb..47ad99f 100755 --- 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 -- 2.30.2