15 Dec
2009
15 Dec
'09
1:50 p.m.
Giovanni Scafora schrieb:
modprobe $mod || grep "$governor" /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors > /dev/null 2>&1
or
grep "$governor" /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors || modprobe $mod > /dev/null 2>&1
The second one doesn't make sense. Don't use >/dev/null in combination with grep, use grep -q: grep -qw "$governor" sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors || modprobe -q $mod