diff options
Diffstat (limited to 'remote/modules')
| -rwxr-xr-x | remote/modules/cpugovernor/data/opt/openslx/scripts/systemd-cpu_governor | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/remote/modules/cpugovernor/data/opt/openslx/scripts/systemd-cpu_governor b/remote/modules/cpugovernor/data/opt/openslx/scripts/systemd-cpu_governor index 115163c7..f7aa255a 100755 --- a/remote/modules/cpugovernor/data/opt/openslx/scripts/systemd-cpu_governor +++ b/remote/modules/cpugovernor/data/opt/openslx/scripts/systemd-cpu_governor @@ -15,7 +15,7 @@ else # use 'ondemand' per default TARGET_GOVERNOR="ondemand" fi -echo "Setting governor to $TARGET_GOVERNOR" +echo "Trying to set CPU governor to $TARGET_GOVERNOR" # global information needed # CORES is the range of cores present, on bwpc4 it has the value '0-3' # thus the split: MINCORE=0 MAXCORE=3 @@ -39,7 +39,7 @@ test_for_gov() { local i=$MINCORE while [ $i -le $MAXCORE ]; do # check if the given governor is supported - grep -q "${GOVERNOR}" /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_available_governors || return 1; + grep -q "${GOVERNOR}" /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_available_governors 2>/dev/null || return 1; # increment true $(( i++ )) done @@ -58,5 +58,5 @@ if test_for_gov "${TARGET_GOVERNOR}"; then done else echo "ERROR: '${TARGET_GOVERNOR}' is not supported by this machine!" - exit 1 + exit 0 fi |
