Je touche au but :
/etc/init.d/cpuspeed :
FC6 :
#!/bin/sh
# Startup script for cpuspeed
#
# chkconfig: 12345 06 99
# description: Run dynamic CPU speed daemon
# Source function library.
. /etc/rc.d/init.d/functions
[ -f /usr/sbin/cpuspeed ] || exit 0
prog="cpuspeed"
# Get config.
if [ -f /etc/cpuspeed.conf ]; then
. /etc/cpuspeed.conf
fi
start() {
if [ ! -f /var/lock/subsys/cpuspeed ]; then
# Attempt to load scaling_driver if not loaded but it is configured
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver; do
# We want to run the code below only if the
# wildcard above got no matches.
[ ! -f "$file" ] || break
if [ -n "$DRIVER" ]; then
/sbin/modprobe "$DRIVER"
else
if [ -d /proc/acpi ]; then
EST=`grep flags /proc/cpuinfo | grep est`
if [ "$EST" ]; then
# use ACPI as a fallback
/sbin/modprobe acpi-cpufreq
# even ACPI didn't work, remove it, and bail out.
if [ -d /sys/devices/system/cpu/cpu0/cpufreq ]; then
/sbin/rmmod acpi-cpufreq
fi
fi
else
# This is a no-ACPI machine. Just exit.
return 0
fi
fi
done
# If we get this far with no driver, we must have no ACPI. We're doomed.
[ ! -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver ] && return 0
drv=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver)
case "$drv" in
centrino|powernow-k8)
/sbin/modprobe cpufreq-ondemand
for i in /sys/devices/system/cpu/cpu*
do
echo ondemand > $i/cpufreq/scaling_governor
done
RETVAL=0
;;
*)
echo -n $"Starting $prog: "
daemon cpuspeed -d $OPTS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/cpuspeed
esac
else
return 0
fi
return $RETVAL
}
stop() {
drv=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver)
case "$drv" in
centrino|powernow-k8)
/sbin/rmmod cpufreq-ondemand
RETVAL=0
;;
*)
if test "x`pidof cpuspeed`" != x; then
echo -n $"Stopping $prog: "
killproc cpuspeed -USR1
killproc cpuspeed -INT
echo
fi
if test "x`pidof cpuspeed`" != x; then
killproc cpuspeed
fi
RETVAL=$?
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/cpuspeed
esac
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status cpuspeed
;;
restart)
stop
start
;;
condrestart)
if test "x`pidof cpuspeed`" != x; then
stop
start
fi
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL
FC5 :
#!/bin/sh
# Startup script for cpuspeed
#
# chkconfig: 12345 06 99
# description: Run dynamic CPU speed daemon
# Source function library.
. /etc/rc.d/init.d/functions
[ -f /usr/sbin/cpuspeed ] || exit 0
prog="cpuspeed"
# Get config.
if [ -f /etc/cpuspeed.conf ]; then
. /etc/cpuspeed.conf
fi
start() {
if [ ! -f /var/lock/subsys/cpuspeed ]; then
# Attempt to load scaling_driver if not loaded but it is configured
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver; do
# We want to run the code below only if the
# wildcard above got no matches.
[ ! -f "$file" ] || break
if [ -n "$DRIVER" ]; then
/sbin/modprobe "$DRIVER"
else
# use ACPI as a fallback if its available.
if [ -f /proc/acpi/processor/CPU0/throttling ]; then
# Check we have throttling states available.
thr=`head -n1 -q /proc/acpi/processor/CPU*/throttling | uniq`
if [ "$thr" != "<not supported>" ]; then
/sbin/modprobe acpi-cpufreq
fi
fi
fi
done
# If we get this far with no driver, we must have no ACPI. We're doomed.
[ ! -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver ] && return 0
echo -n $"Starting $prog: "
daemon cpuspeed -d $OPTS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/cpuspeed
else
return 0
fi
return $RETVAL
}
stop() {
if test "x`pidof cpuspeed`" != x; then
echo -n $"Stopping $prog: "
killproc cpuspeed -USR1
killproc cpuspeed -INT
echo
fi
if test "x`pidof cpuspeed`" != x; then
killproc cpuspeed
fi
RETVAL=$?
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/cpuspeed
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status cpuspeed
;;
restart)
stop
start
;;
condrestart)
if test "x`pidof cpuspeed`" != x; then
stop
start
fi
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL
case "$drv" in
centrino|powernow-k8)
/sbin/modprobe cpufreq-ondemand
for i in /sys/devices/system/cpu/cpu*
do
echo ondemand > $i/cpufreq/scaling_governor
done
RETVAL=0
;;
Sur FC6 les centrino son ondemand !