--- debian/landscape-sysinfo.wrapper 2010-07-23 08:28:59 +0000 +++ debian/landscape-sysinfo.wrapper 2011-01-12 22:18:56 +0000 @@ -1,5 +1,7 @@ #!/bin/sh -if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` < 1.0" | bc) -eq 1 ]; then +cores=$(grep -c ^processor /proc/cpuinfo 2>/dev/null) +threshold="${cores:-1}.0" +if [ $(echo "`cut -f1 -d ' ' /proc/loadavg` < $threshold" | bc) -eq 1 ]; then echo echo -n " System information as of " /bin/date @@ -7,5 +9,5 @@ /usr/bin/landscape-sysinfo else echo - echo " System information disabled due to load higher than 1" + echo " System information disabled due to load higher than $threshold" fi