summaryrefslogtreecommitdiff
path: root/source/a/sysvinit-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/sysvinit-scripts')
-rw-r--r--source/a/sysvinit-scripts/default/cpufreq3
-rw-r--r--source/a/sysvinit-scripts/doinst.sh1
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.cpufreq8
-rwxr-xr-xsource/a/sysvinit-scripts/sysvinit-scripts.SlackBuild6
4 files changed, 16 insertions, 2 deletions
diff --git a/source/a/sysvinit-scripts/default/cpufreq b/source/a/sysvinit-scripts/default/cpufreq
new file mode 100644
index 00000000..13dcda6e
--- /dev/null
+++ b/source/a/sysvinit-scripts/default/cpufreq
@@ -0,0 +1,3 @@
+# To select a particular CPU governor option for /etc/rc.d/rc.cpufreq,
+# uncomment the line below and edit it to select your choice:
+#SCALING_GOVERNOR=ondemand
diff --git a/source/a/sysvinit-scripts/doinst.sh b/source/a/sysvinit-scripts/doinst.sh
index f6e94f5d..c11a1798 100644
--- a/source/a/sysvinit-scripts/doinst.sh
+++ b/source/a/sysvinit-scripts/doinst.sh
@@ -23,6 +23,7 @@ config etc/rc.d/rc.loop.new
config etc/rc.d/rc.sysvinit.new
config etc/rc.d/rc.modules.new
config etc/rc.d/rc.modules.local.new
+config etc/default/cpufreq.new
( cd etc/rc.d ; rm -rf rc.0 )
( cd etc/rc.d ; ln -sf rc.6 rc.0 )
diff --git a/source/a/sysvinit-scripts/scripts/rc.cpufreq b/source/a/sysvinit-scripts/scripts/rc.cpufreq
index 24adb8d9..4caaa5a4 100644
--- a/source/a/sysvinit-scripts/scripts/rc.cpufreq
+++ b/source/a/sysvinit-scripts/scripts/rc.cpufreq
@@ -33,7 +33,7 @@ SCALING_GOVERNOR=ondemand
# provides power savings on Intel processors while avoiding the ramp-up lag
# present when using the powersave governor (which is the default if ondemand
# is requested on these machines):
-if [ "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver)" = "intel_pstate" ]; then
+if [ "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver 2> /dev/null)" = "intel_pstate" ]; then
SCALING_GOVERNOR="performance"
fi
@@ -42,6 +42,12 @@ if [ ! -z "$1" -a "$1" != "start" ]; then
SCALING_GOVERNOR=$1
fi
+# To force a particular option without having to edit this file, uncomment the
+# line in /etc/default/cpufreq and edit it to select the desired option:
+if [ -r /etc/default/cpufreq ]; then
+ . /etc/default/cpufreq
+fi
+
# If you need to load a specific CPUFreq driver, load it here. Most likely you don't.
#/sbin/modprobe acpi-cpufreq
diff --git a/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild b/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild
index 8876e329..1fa513f9 100755
--- a/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild
+++ b/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=sysvinit-scripts
VERSION=${VERSION:-2.1}
ARCH=noarch
-BUILD=${BUILD:-18}
+BUILD=${BUILD:-19}
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
@@ -52,6 +52,10 @@ cat $CWD/scripts/inittab > $PKG/etc/inittab.new
chmod 644 $PKG/etc/inittab.new
chown root:root $PKG/etc/inittab.new
+# Install /etc/default/cpufreq.new:
+mkdir -p $PKG/etc/default
+cat $CWD/default/cpufreq > $PKG/etc/default/cpufreq.new
+
# Add a very handy tool for scanning new SCSI devices. Most useful for
# finding new USB and Firewire storage devices which show up as SCSI.
mkdir -p $PKG/sbin