#!/bin/bash source /etc/functions.magic ### # Monitors patch # Copyright (C) Thomas "ShALLaX" Pedley (gentoox@shallax.com) # # 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 2 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, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ### $important clear echo "This will install tools to let you change your fan speed and" echo "check system temperatures" echo "" echo "The config file for fanctl is /etc/conf.d/fanctl" echo "The config file for loadmonitor is /etc/conf.d/loadmonitor" sleep 10 $busy cd /bin ### # Download source ### $downloading rm -rf ./monitors.tbz2* $wget --limit-rate=$limitrate $gentooxurl/patch-files/monitors.tbz2 failCheck download $busy tar -jxvf /bin/monitors.tbz2 failCheck decompress rm -rf /bin/monitors.tbz2 chmod 755 /bin/fanctl chmod 755 /bin/xboxtemp chmod 755 /bin/loadmonitor chmod 755 /bin/testi2c chmod +s /bin/xboxtemp clear cd /etc/init.d/ rm -rf /etc/init.d/fanctl* $downloading $wget --limit-rate=$limitrate $gentooxurl/patch-files/fanctl.rc failCheck download $busy mv /etc/init.d/fanctl.rc /etc/init.d/fanctl cd /etc/conf.d rm -rf /etc/conf.d/fanctl* $downloading $wget --limit-rate=$limitrate $gentooxurl/patch-files/fanctl.conf failCheck download $busy mv /etc/conf.d/fanctl.conf /etc/conf.d/fanctl chmod 744 /etc/init.d/fanctl rc-update del fanctl default 1> /dev/null 2> /dev/null rc-update add fanctl default 1> /dev/null 2> /dev/null /etc/init.d/fanctl stop 1> /dev/null 2> /dev/null /etc/init.d/fanctl zap 1> /dev/null 2> /dev/null killall fanctl 1> /dev/null 2> /dev/null rm -rf /var/lock/fanctl.lock /etc/init.d/fanctl start 1> /dev/null 2> /dev/null rm -rf /bin/emergencyheat echo "Removing old loadmonitor from cron..." /etc/init.d/dcron stop 1> /dev/null 2> /dev/null grep -v loadmonitor /var/spool/cron/crontabs/root > /var/spool/cron/crontabs/root.tmp mv /var/spool/cron/crontabs/root.tmp /var/spool/cron/crontabs/root chown root:root /var/spool/cron/crontabs/root chmod 600 /var/spool/cron/crontabs/root /etc/init.d/dcron start 1> /dev/null 2> /dev/null cd /etc/init.d/ rm -rf /etc/init.d/loadmonitor* $downloading $wget --limit-rate=$limitrate $gentooxurl/patch-files/loadmonitor.rc failCheck download $busy mv /etc/init.d/loadmonitor.rc /etc/init.d/loadmonitor cd /etc/conf.d rm -rf /etc/conf.d/loadmonitor* $downloading $wget --limit-rate=$limitrate $gentooxurl/patch-files/loadmonitor.conf failCheck download $busy mv /etc/conf.d/loadmonitor.conf /etc/conf.d/loadmonitor chmod 744 /etc/init.d/loadmonitor rc-update del loadmonitor default 1> /dev/null 2> /dev/null rc-update add loadmonitor default 1> /dev/null 2> /dev/null /etc/init.d/loadmonitor stop 1> /dev/null 2> /dev/null /etc/init.d/loadmonitor zap 1> /dev/null 2> /dev/null killall loadmonitor 1> /dev/null 2> /dev/null rm -rf /var/lock/loadmonitor.lock /etc/init.d/loadmonitor start 1> /dev/null 2> /dev/null clear $important echo "fanctl and loadmonitor are daemons." echo "All feedback is logged in /var/log/syslog" echo "They are both automatically started on boot." sleep 10