mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-13 12:32:59 +02:00
Add cpufrequtils
Disabled collectd wireless plugin as default, (enabling by hostapd initskript)
This commit is contained in:
@@ -13,6 +13,7 @@ Interval 30
|
||||
ReadThreads 3
|
||||
|
||||
LoadPlugin cpu
|
||||
#LoadPlugin cpufreq
|
||||
LoadPlugin disk
|
||||
LoadPlugin interface
|
||||
LoadPlugin iptables
|
||||
@@ -26,7 +27,7 @@ LoadPlugin rrdtool
|
||||
LoadPlugin sensors
|
||||
LoadPlugin swap
|
||||
LoadPlugin syslog
|
||||
LoadPlugin wireless
|
||||
#LoadPlugin wireless
|
||||
|
||||
<Plugin interface>
|
||||
Interface "lo"
|
||||
|
||||
17
config/rootfiles/packages/cpufrequtils
Normal file
17
config/rootfiles/packages/cpufrequtils
Normal file
@@ -0,0 +1,17 @@
|
||||
usr/bin/cpufreq-info
|
||||
usr/bin/cpufreq-set
|
||||
#usr/include/cpufreq.h
|
||||
#usr/lib/libcpufreq.a
|
||||
#usr/lib/libcpufreq.la
|
||||
usr/lib/libcpufreq.so
|
||||
usr/lib/libcpufreq.so.0
|
||||
usr/lib/libcpufreq.so.0.0.0
|
||||
#usr/man/man1/cpufreq-info.1
|
||||
#usr/man/man1/cpufreq-set.1
|
||||
#usr/share/locale/cs/LC_MESSAGES/cpufrequtils.mo
|
||||
usr/share/locale/de/LC_MESSAGES/cpufrequtils.mo
|
||||
#usr/share/locale/fr/LC_MESSAGES/cpufrequtils.mo
|
||||
#usr/share/locale/it/LC_MESSAGES/cpufrequtils.mo
|
||||
#usr/share/locale/pt/LC_MESSAGES/cpufrequtils.mo
|
||||
etc/rc.d/init.d/cpufreq
|
||||
etc/rc.d/rc3.d/S18cpufreq
|
||||
@@ -64,6 +64,7 @@
|
||||
* collectd-4.4.1
|
||||
* coreutils-5.96
|
||||
* cpio-2.6
|
||||
* cpufrequtils-004
|
||||
* cups-1.3.7
|
||||
* curl-7.15.3
|
||||
* cyrus-imapd-2.2.12
|
||||
|
||||
@@ -79,7 +79,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && ./configure --prefix=/usr --localstatedir=/var \
|
||||
--disable-{apple_sensors,csv,ipvs,mbmon,memcached,mysql} \
|
||||
--disable-{netlink,nginx,nut,perl,serial,snmp,tape,vserver,wireless,xmms} \
|
||||
--disable-{netlink,nginx,nut,perl,serial,snmp,tape,vserver,xmms} \
|
||||
--disable-{perl,serial,snmp,tape,vserver,xmms} \
|
||||
--enable-{apcups,battery,cpu{,freq},df,disk,dns,email,entropy,exec,hddtemp} \
|
||||
--enable-{interface,iptables,irq,load,logfile,memory,multimeter} \
|
||||
|
||||
83
lfs/cpufrequtils
Normal file
83
lfs/cpufrequtils
Normal file
@@ -0,0 +1,83 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# 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/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 004
|
||||
|
||||
THISAPP = cpufrequtils-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.bz2
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
PROG = cpufrequtils
|
||||
PAK_VER = 1
|
||||
|
||||
DEPS = ""
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = f868b9b6642c6c16b36cfd3eb627506a
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||
|
||||
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
md5 : $(subst %,%_MD5,$(objects))
|
||||
|
||||
dist:
|
||||
@$(PAK)
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, md5sum
|
||||
###############################################################################
|
||||
|
||||
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||
@$(CHECK)
|
||||
|
||||
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||
@$(LOAD)
|
||||
|
||||
$(subst %,%_MD5,$(objects)) :
|
||||
@$(MD5)
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && make
|
||||
cd $(DIR_APP) && make install
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
@@ -97,6 +97,7 @@ $(TARGET) :
|
||||
ln -sf ../init.d/halt /etc/rc.d/rc0.d/S99halt
|
||||
ln -sf ../init.d/sysklogd /etc/rc.d/rc3.d/S10sysklogd
|
||||
ln -sf ../init.d/smartenabler /etc/rc.d/rc3.d/S19smartenabler
|
||||
ln -sf ../init.d/cpufreq /etc/rc.d/rc3.d/S18cpufreq
|
||||
ln -sf ../init.d/sysklogd /etc/rc.d/rc6.d/K90sysklogd
|
||||
ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals
|
||||
ln -sf ../init.d/mountfs /etc/rc.d/rc6.d/S70mountfs
|
||||
|
||||
1
make.sh
1
make.sh
@@ -586,6 +586,7 @@ buildipfire() {
|
||||
ipfiremake urlgrabber
|
||||
ipfiremake syslinux
|
||||
ipfiremake tftp-hpa
|
||||
ipfiremake cpufrequtils
|
||||
echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild
|
||||
cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild
|
||||
echo >> $BASEDIR/build/var/ipfire/firebuild
|
||||
|
||||
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