From 8284349d89bb53716ea85751dd676fad5b0fe723 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 15 May 2012 15:32:27 +0200 Subject: [PATCH] reniced: Better explanation of what happened. zram: Try to be backwards compatible. --- reniced/reniced | 9 ++++++--- zram-init/zram | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/reniced/reniced b/reniced/reniced index 2aca2c9..0f220b6 100755 --- a/reniced/reniced +++ b/reniced/reniced @@ -56,7 +56,7 @@ sub mail { my($cpu_seconds, $user, @command) = @_; my @mail = ( - 'From: Ole Tanges renice program ', + 'From: The renice program ', "To: <$user>", 'Subject: Your program has been reniced', '', @@ -68,7 +68,10 @@ sub mail { '', "has been using more than $cpu_seconds CPU seconds. I have therefore niced it to nice level 19.", '', - 'If you want to avoid that in the future, you can start the program with a different nice level:', + 'There is no harm done, this is purely for your information so you know what happened and how', + 'to avoid it.', + '', + 'If you want to avoid it in the future, you can start the program with a different nice level:', '', ' nice -n XX your_command', '', @@ -80,7 +83,7 @@ sub mail { '', 'Regards', '', - "Ole Tange's renice program", + "The renice program", ); open(S,"|/usr/sbin/sendmail -t") or die; diff --git a/zram-init/zram b/zram-init/zram index 93e7ddb..0817839 100755 --- a/zram-init/zram +++ b/zram-init/zram @@ -24,7 +24,7 @@ start() { mem_total=$((mem_total_kb * 1024)) # load dependency modules - modprobe zram zram_num_devices=$num_cpus + modprobe zram zram_num_devices=$num_cpus || modprobe zram num_devices=$num_cpus || exit 1 # initialize the devices for i in $(seq 0 $decr_num_cpus); do