mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-19 15:32:59 +02:00
Add cpufrequtils
Disabled collectd wireless plugin as default, (enabling by hostapd initskript)
This commit is contained in:
59
src/initscripts/init.d/cpufreq
Normal file
59
src/initscripts/init.d/cpufreq
Normal file
@@ -0,0 +1,59 @@
|
||||
#!/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 : 00.00
|
||||
#
|
||||
# Notes :
|
||||
#
|
||||
########################################################################
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. ${rc_functions}
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
boot_mesg "Starting cpufreq ..."
|
||||
# Chose your cpufreq module, acpi-cpufreq should work with
|
||||
# newer hardware
|
||||
modprobe acpi-cpufreq
|
||||
# modprobe cpufreq-nforce2
|
||||
# modprobe e-powersaver
|
||||
# modprobe gx-suspmod
|
||||
# modprobe longhaul
|
||||
# modprobe longrun
|
||||
# modprobe p4-clockmod
|
||||
# modprobe powernow-k6
|
||||
# modprobe powernow-k7
|
||||
# modprobe powernow-k8
|
||||
# modprobe speedstep-centrino
|
||||
# modprobe speedstep-ich
|
||||
# modprobe speedstep-lib
|
||||
# modprobe speedstep-smi
|
||||
|
||||
# load cqufreq governors
|
||||
modprobe cpufreq_conservative
|
||||
modprobe cpufreq_ondemand
|
||||
modprobe cpufreq_powersave
|
||||
modprobe cpufreq_userspace
|
||||
|
||||
# Set the governor to ondemand
|
||||
cpufreq-set -g ondemand
|
||||
evaluate_retval;
|
||||
|
||||
# activate cpufreq collectd module
|
||||
sed -i -e "s|#LoadPlugin cpufreq|LoadPlugin cpufreq|g" /etc/collectd.conf
|
||||
|
||||
exit 0;
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ${0} {start}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/cpufreq
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
# enable wlan module of collectd
|
||||
sed -i -e "s|#LoadPlugin wireless|LoadPlugin wireless|g" /etc/collectd.conf
|
||||
/usr/local/bin/wlanconfig ath0 destroy
|
||||
/usr/local/bin/wlanconfig blue0 create wlandev wifi0 wlanmode ap
|
||||
/usr/sbin/iwconfig blue0 channel 05
|
||||
@@ -12,8 +14,8 @@ case "${1}" in
|
||||
;;
|
||||
|
||||
stop)
|
||||
# Just make shure when going down the first time blue0 nw values are ignored
|
||||
sed -i -e 's/^ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="*", NAME="blue0"*/#ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="*", NAME="blue0"*/' /etc/udev/rules.d/30-persistent-network.rules
|
||||
# Just make sure when going down the first time blue0 nw values are ignored
|
||||
sed -i -e 's/^ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="*", NAME="blue0"*/#ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="*", NAME="blue0"*/' /etc/udev/rules.d/30-persistent-network.rules
|
||||
/usr/local/bin/wlanconfig blue0 destroy
|
||||
killproc /usr/bin/hostapd
|
||||
evaluate_retval
|
||||
|
||||
Reference in New Issue
Block a user