File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,11 @@ CPUPATH=/sys/devices/system/cpu
44
55MAXID=$( cat $CPUPATH /present | awk -F- ' {print $NF}' )
66
7- if [ " $( uname -s || true) " != " Linux" ]; then
8- echo " Error: This script runs on Linux only." >&2
9- exit 1
10- fi
11-
12- if [ " $( id -u || true) " -ne 0 ]; then
13- echo " Error: Run as root (sudo) to modify CPU governor." >&2
14- exit 1
15- fi
7+ [ " $( uname -s || true) " = " Linux" ] || \
8+ echo " Warning: This script supports Linux only." >&2
9+
10+ [ " $( id -u || true) " = " 0" ] || \
11+ echo " Warning: This script typically needs root access to modify CPU governor. Consider running it with sudo." >&2
1612
1713get_default_governor () {
1814 available_governors=$( cat " $CPUPATH /cpu0/cpufreq/scaling_available_governors" )
You can’t perform that action at this time.
0 commit comments