Hi Andreas Henriksson schrieb am 08.03.2017, 21:55 +0100: >On Wed, Mar 08, 2017 at 10:57:38AM +0100, Sebastian Humenda wrote: >> Package: cpufrequtils >> Version: 008-1+b1 >> Severity: grave >> Justification: renders package unusable >[...] >> Mar 08 10:54:47 kraftkrust cpufrequtils[13461]: /etc/init.d/cpufrequtils: 3: >> /etc/default/cpufrequtils: Syntax error: Unterminated quoted string >[...] > >The /etc/init.d/cpufrequtils file is not shipped in the package since >cpufrequtils 002-2.1 (a very long time ago, prior to old-old-stable). This machine was set up with Jessie, so it's certainly not a left-over.
>I would guess the init script breaking down is simply caused by your >local configuration. Possibly the package did not properly remove >the config file back when it was removed ages ago. Mh, ok. I have tried `sudo apt-get purge cpufrequtils && sudo apt install cpufrequtils`. After a purge, no init script is present. >Anyway, the installs and works fine here in the normal case. I am interested what the unusual case for my system is. >Could you please attach your /etc/init.d/cpufrequtils ? Do you know >if this file was ever modified by you or not? It is attached. It has not been modified by me, especially I have just purged it and the issue persists. Sorry for the late reply, I had overlooked the email and will respond in a more timely fashion to make this not a blocker for Stretch. Thanks! Sebastian
#!/bin/sh
### BEGIN INIT INFO
# Provides: cpufrequtils
# Required-Start: $remote_fs loadcpufreq
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: set CPUFreq kernel parameters
# Description: utilities to deal with CPUFreq Linux
# kernel support
### END INIT INFO
#
DESC="CPUFreq Utilities"
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
CPUFREQ_SET=/usr/bin/cpufreq-set
CPUFREQ_INFO=/usr/bin/cpufreq-info
CPUFREQ_OPTIONS=""
# use lsb-base
. /lib/lsb/init-functions
# Which governor to use. Must be one of the governors listed in:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
#
# and which limits to set. Both MIN_SPEED and MAX_SPEED must be values
# listed in:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
# a value of 0 for any of the two variables will disabling the use of
# that limit variable.
#
# WARNING: the correct kernel module must already be loaded or compiled in.
#
# Set ENABLE to "true" to let the script run at boot time.
#
# eg: ENABLE="true"
# GOVERNOR="ondemand"
# MAX_SPEED=1000
# MIN_SPEED=500
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="0"
MIN_SPEED="0"
check_governor_avail() {
info="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
if [ -f $info ] && grep -q "\<$GOVERNOR\>" $info ; then
return 0;
fi
return 1;
}
[ -x $CPUFREQ_SET ] || exit 0
if [ -f /etc/default/cpufrequtils ] ; then
. /etc/default/cpufrequtils
fi
# if not enabled then exit gracefully
[ "$ENABLE" = "true" ] || exit 0
if [ -n "$MAX_SPEED" ] && [ $MAX_SPEED != "0" ] ; then
CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --max $MAX_SPEED"
fi
if [ -n "$MIN_SPEED" ] && [ $MIN_SPEED != "0" ] ; then
CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --min $MIN_SPEED"
fi
if [ -n "$GOVERNOR" ] ; then
CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --governor $GOVERNOR"
fi
CPUS=$(cat /proc/stat|sed -ne 's/^cpu\([[:digit:]]\+\).*/\1/p')
RETVAL=0
case "$1" in
start|force-reload|restart|reload)
log_action_begin_msg "$DESC: Setting $GOVERNOR CPUFreq governor"
if check_governor_avail ; then
for cpu in $CPUS ; do
log_action_cont_msg "CPU${cpu}"
$CPUFREQ_SET --cpu $cpu $CPUFREQ_OPTIONS 2>&1 >
/dev/null || \
RETVAL=$?
done
log_action_end_msg $RETVAL ""
else
log_action_cont_msg "disabled, governor not available"
log_action_end_msg $RETVAL
fi
;;
stop)
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}"
exit 1
esac
exit 0
signature.asc
Description: PGP signature

