aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2018-12-09 13:50:47 +0100
committerDavid Runge <dave@sleepmap.de>2018-12-09 13:50:47 +0100
commitd5ebfe425f13b6b584bc0541a900aab1150d9e1f (patch)
treeef86f8e82ea1c34c9e8c39ebe4d1c5203c424485 /bin
parent99f06a2e3c2b6e040895ac7fe5963ae7ba8298d5 (diff)
downloaddotfiles-d5ebfe425f13b6b584bc0541a900aab1150d9e1f.tar.gz
dotfiles-d5ebfe425f13b6b584bc0541a900aab1150d9e1f.tar.bz2
dotfiles-d5ebfe425f13b6b584bc0541a900aab1150d9e1f.tar.xz
dotfiles-d5ebfe425f13b6b584bc0541a900aab1150d9e1f.zip
bin/realtime-suggestions: Changing check for policy directory in check_cpu_governor(), so that we fail if we don't at least find one policy dir.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/realtime-suggestions6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/realtime-suggestions b/bin/realtime-suggestions
index 9235651..cf5f599 100755
--- a/bin/realtime-suggestions
+++ b/bin/realtime-suggestions
@@ -102,12 +102,12 @@ check_max_user_watches() {
}
check_cpu_governor() {
- local governor_dir="/sys/devices/system/cpu/cpufreq/"
+ local policy_dir="/sys/devices/system/cpu/cpufreq/"
local cpupower_ref="(see \`man cpupower\` for reference)"
local governor=""
local policy_no=""
local cpu_no=""
- if [ -d "${governor_dir}" ]; then
+ if [ -d "${policy_dir}/policy0" ]; then
for governor_file in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do
governor="$(cat "$governor_file")"
policy_no="$(echo "$governor_file"| cut -d'/' -f7)"
@@ -117,7 +117,7 @@ check_cpu_governor() {
fi
done
else
- echo "$warning Unable to detect any CPU governor on your machine. ${governor_dir} does not exist!"
+ echo "$warning Unable to detect any CPU governor on your machine. ${policy_dir} is empty!"
fi
}