From 9ec08a1cdb368467e5e79bce840686ad845b125c Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Sat, 16 Sep 2017 04:22:21 -0400 Subject: Check if /sys/devices/system/cpu/intel_pstate/no_turbo exists before searching it --- etc/machine.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/machine.sh b/etc/machine.sh index fa8d419b4..5fcb7289a 100755 --- a/etc/machine.sh +++ b/etc/machine.sh @@ -5,7 +5,11 @@ printf "$(hostname)" printf - grep -q '[^0-9]' /sys/devices/system/cpu/cpu[0-9]*/topology/thread_siblings_list && printf ht || printf noht printf - -grep -q 1 /sys/devices/system/cpu/intel_pstate/no_turbo && printf notb || printf tb +if [ -f /sys/devices/system/cpu/intel_pstate/no_turbo ]; then + grep -q 1 /sys/devices/system/cpu/intel_pstate/no_turbo && printf notb || printf tb +else + printf notb_support +fi printf - if [ -f /sys/class/power_supply/AC/online ]; then grep -q 1 /sys/class/power_supply/AC/online && printf ac || printf noac -- cgit v1.2.3