]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/packages/cpufreq
Early spring clean: Remove trailing whitespaces, and correct licence headers
[people/pmueller/ipfire-2.x.git] / src / initscripts / packages / cpufreq
index 6a89414b2d690e3dc80414e8b2d3940b55c352ad..beee532b5009981faf03f7e75339e7096c731a31 100644 (file)
@@ -1,16 +1,23 @@
 #!/bin/sh
-########################################################################
-# Begin $rc_base/init.d/cpufreq
-#
-# Description : Initalisize and startup cpufreq and set a governor
-#
-# Authors     : Arne Fitzenreiter - arne_f@ipfire.org
-#
-# Version     : 01.01
-#
-# Notes       :
-#
-########################################################################
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2022  IPFire Team  <info@ipfire.org>                     #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
 
 . /etc/sysconfig/rc
 . ${rc_functions}
@@ -21,7 +28,7 @@ case "${1}" in
 
                # try cpufreq hardware depend modules
                for i in $(find /lib/modules/$(uname -r)/kernel/drivers/cpufreq \
-                          ! -name speedstep-lib.ko ! -name p4-clockmod.ko ! -name "cpufreq_*" ! -name mperf.ko | sort -d -r); do
+                          ! -name speedstep-lib.ko.xz ! -name p4-clockmod.ko.xz ! -name "cpufreq_*" ! -name mperf.ko.xz | sort -d -r); do
                        module=$(basename $i | cut -d. -f1);
                        modprobe $module > /dev/null 2>&1;
                        if [ ${?} = 0 ]; then
@@ -41,8 +48,6 @@ case "${1}" in
                case "$driver" in
                    intel_pstate)
                        # pstate use internal gov so skip this setting
-                       # activate cpufreq collectd module
-                       sed -i -e "s|^#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc/collectd.conf
                        echo_ok;
                        ;;
                    *)
@@ -51,9 +56,6 @@ case "${1}" in
                        # Set the governor to ondemand to test if it works 
                        cpufreq-set -g ondemand
                        if [ ${?} = 0 ]; then
-                               # activate cpufreq collectd module
-                               sed -i -e "s|^#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc/collectd.conf
-
                                # Set the governor to ondemand for all cpus 
                                for i in `seq 0 $CPUCOUNT`;
                                do
@@ -72,7 +74,3 @@ case "${1}" in
                exit 1
                ;;
 esac
-
-# End $rc_base/init.d/cpufreq
-
-