processor: fix to avoid reporting script execution error on log
This commit is contained in:
parent
29c1787405
commit
9e035594d9
@ -7,12 +7,11 @@
|
||||
|
||||
[ -e /etc/sysconfig/acpi ] && . /etc/sysconfig/acpi
|
||||
|
||||
[ "$CPU_FREQ" = "" ] && {
|
||||
[ "$CPU_FREQ" ] && exit 0
|
||||
|
||||
CPUMODEL=`cat /proc/cpuinfo | grep "model name" -m1 | sed "s|model name[[:space:]*]:\(.*\)|\1|" `
|
||||
|
||||
if [ "`echo $CPUMODEL | grep AMD`" ]; then
|
||||
|
||||
CPUVENDOR=AMD
|
||||
if [ "`echo $CPUMODEL | grep X2`" ]; then
|
||||
LOAD_MODULE=powernow_k8
|
||||
@ -23,14 +22,9 @@
|
||||
else
|
||||
LOAD_MODULE=acpi_cpufreq
|
||||
fi
|
||||
|
||||
elif [ "`echo $CPUMODEL | grep Intel`" ]; then
|
||||
|
||||
CPUVENDOR=Intel
|
||||
LOAD_MODULE=acpi_cpufreq
|
||||
fi
|
||||
|
||||
[ -e /etc/sysconfig/acpi ] && sed -i "/CPU_FREQ=.*/d" /etc/sysconfig/acpi
|
||||
echo "CPU_FREQ=$LOAD_MODULE" >> /etc/sysconfig/acpi
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user