diff options
Diffstat (limited to 'etc/turboboost.sh')
-rwxr-xr-x | etc/turboboost.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/etc/turboboost.sh b/etc/turboboost.sh index f336660ec..69c5ba054 100755 --- a/etc/turboboost.sh +++ b/etc/turboboost.sh @@ -1,8 +1,16 @@ #!/bin/sh set -eu +usage() { + echo "USAGE: $0 <on|off>" ; exit 111 +} + +if [ "$#" -eq 0 ]; then + usage +fi + case $1 in on) echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo ;; off) echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo ;; - *) echo "USAGE: $0 <on|off>" ; exit 111 + *) usage esac |