diff --git a/lm_sensors.service b/lm_sensors.service new file mode 100644 index 0000000..7f6a9f8 --- /dev/null +++ b/lm_sensors.service @@ -0,0 +1,13 @@ +[Unit] +Description=Hardware Monitoring Sensors + +[Service] +EnvironmentFile=/etc/sysconfig/lm_sensors +Type=oneshot +RemainAfterExit=yes +ExecStart=-/usr/libexec/lm_sensors/lm_sensors-modprobe-wrapper $BUS_MODULES $HWMON_MODULES +ExecStart=/usr/libexec/lm_sensors/lm_sensors-wrapper +ExecStop=-/usr/libexec/lm_sensors/lm_sensors-modprobe-r-wrapper $BUS_MODULES $HWMON_MODULES + +[Install] +WantedBy=multi-user.target diff --git a/prog/hotplug/unhide_ICH_SMBus b/prog/hotplug/unhide_ICH_SMBus deleted file mode 100755 index 13fccc9..0000000 --- a/prog/hotplug/unhide_ICH_SMBus +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -# (C) Rudolf Marek , -# Copyright (C) 2007-2011 Jean Delvare -# -# Thanks Jean Delvare and Oliver Dreier for testing. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 -# as published by the Free Software Foundation -# -# Supports the following Intel ICH chipsets: -# PCI ID -# ICH 8086:2410 -# ICH2 8086:2440 -# ICH2-M 8086:244C -# ICH3 8086:2480 -# ICH3-M 8086:248C -# ICH4 8086:24C0 -# ICH4-M 8086:24CC -# ICH5 8086:24D0 - -pcibus="/sys/bus/pci/slots" -device="00:1f" - -if [ "$UID" -ne 0 ] ; then - echo "You need to be root to run this script!" - exit 252 -fi - -smbus=`lspci -n -s $device.3 | grep -i '0c05: *8086'` -if [ -n "$smbus" ] ; then - echo "ICH SMBus is already there!" - lspci -s $device.3 - exit -fi - -intel=`lspci -n -s $device.0 | grep -i '8086:24[148CD][0C]'` -if [ -z "$intel" ] ; then - echo "Not for your chipset - Intel (ICH) only" - echo "Supported: ICH, ICH2, ICH2-M, ICH3, ICH3-M, ICH4, ICH4-M, ICH5" - exit 255; -fi -modprobe fakephp &> /dev/null - -if [ ! -d "$pcibus" ] ; then - echo "You need the fake PCI hotplug driver! (fakephp.ko, kernel 2.6.5 or later)" - exit 255; -fi - -echo "Enabling SMBus PCI device ..." - -newval=$( printf '%x' $((0x$(setpci -s $device.0 f2.w) & 0xfff7))) -setpci -s $device.0 f2.w=$newval - -echo "Rescanning the bus ..." -echo 1 > $pcibus/0000:$device.0/power 2>/dev/null -if [ ! -d "$pcibus/0000:$device.3" ] ; then - echo "Failed to enable the SMBUS" - exit 253; -fi - -if [ ! -d "/sys/bus/pci/drivers/i801_smbus" ] ; then - echo "Loading i2c-i801 ..." - modprobe i2c-i801 - if [ $? -ne 0 ] ; then - exit 251 - fi -fi - -lspci -s $device.3 -echo "Done!" -echo "Remember: system suspend/resume is no longer safe to use." diff --git a/prog/init/README b/prog/init/README deleted file mode 100644 index 7552a67..0000000 --- a/prog/init/README +++ /dev/null @@ -1,33 +0,0 @@ -This directory contains files useful for initialization -scripts, especially for RedHat. - -There are two choices, lm_sensors.init and sensord.init. -Use one or the other but not both! - ----------------- - -The script lm_sensors.init is a nice startup/shutdown script. -On RH and other RH-based systems (MDK, notably) use this sort of startup -mechanism (i.e. SVR4-based), as opposed to the everything-in-one-script -(/etc/rc or /etc/rc.local) like the BSD-based systems do. -The lm_sensors.init file should be copied to /etc/rc.d/init.d/lm_sensors. -For more information see the top of the file. -It requires the /etc/sysconfig/lm_sensors file, which identifies -the correct modules. - -The /etc/sysconfig/lm_sensors file is generated by running sensors-detect. -Once the script is done detecting the hardware monitoring devices, it will -list all the required modules in that file, so that they can be loaded -automatically at boot time. - ----------------- - -The script sensord.init also loads the modules, and then -starts the sensord daemon. See the manual page sensord(8) for -more information on the daemon. - -The sensord.init file should be copied to /etc/rc.d/init.d/sensord. -For more information see the top of the file. - -To configure this service one should put appropriate "alias i2c-bus-0 xxx" -and "alias i2c-sensors-chip-0 xxx" in /etc/modules.conf. diff --git a/prog/init/README.initscripts b/prog/init/README.initscripts new file mode 100644 index 0000000..7552a67 --- /dev/null +++ b/prog/init/README.initscripts @@ -0,0 +1,33 @@ +This directory contains files useful for initialization +scripts, especially for RedHat. + +There are two choices, lm_sensors.init and sensord.init. +Use one or the other but not both! + +---------------- + +The script lm_sensors.init is a nice startup/shutdown script. +On RH and other RH-based systems (MDK, notably) use this sort of startup +mechanism (i.e. SVR4-based), as opposed to the everything-in-one-script +(/etc/rc or /etc/rc.local) like the BSD-based systems do. +The lm_sensors.init file should be copied to /etc/rc.d/init.d/lm_sensors. +For more information see the top of the file. +It requires the /etc/sysconfig/lm_sensors file, which identifies +the correct modules. + +The /etc/sysconfig/lm_sensors file is generated by running sensors-detect. +Once the script is done detecting the hardware monitoring devices, it will +list all the required modules in that file, so that they can be loaded +automatically at boot time. + +---------------- + +The script sensord.init also loads the modules, and then +starts the sensord daemon. See the manual page sensord(8) for +more information on the daemon. + +The sensord.init file should be copied to /etc/rc.d/init.d/sensord. +For more information see the top of the file. + +To configure this service one should put appropriate "alias i2c-bus-0 xxx" +and "alias i2c-sensors-chip-0 xxx" in /etc/modules.conf. diff --git a/prog/init/fancontrol.init b/prog/init/fancontrol.init old mode 100755 new mode 100644 diff --git a/prog/init/sysconfig-lm_sensors-convert b/prog/init/sysconfig-lm_sensors-convert deleted file mode 100755 index 0b907a5..0000000 --- a/prog/init/sysconfig-lm_sensors-convert +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# Convert an lm_sensors service configuration file from the old convention -# (MODULE_0, MODULE_1...) to the new convention (HWMON_MODULES). -# -# Copyright (C) 2009 Jean Delvare -# -# Released without a license on purpose. This is public domain code, so -# that package maintainers can include it in their post-install script. - -CONFIG=/etc/sysconfig/lm_sensors -test -r "$CONFIG" || exit 0 - -unset ${!MODULE_*} $HWMON_MODULES -. "$CONFIG" -test -n "$HWMON_MODULES" && exit 0 - -for i in ${!MODULE_*} ; do - eval module=\$$i - if test -z "$HWMON_MODULES" ; then - HWMON_MODULES="$module" - else - HWMON_MODULES="$HWMON_MODULES $module" - fi -done -test -z "$HWMON_MODULES" && exit 0 - -echo >> "$CONFIG" -echo "# New configuration format generated by sysconfig-lm_sensors-convert" >> "$CONFIG" -echo "HWMON_MODULES=\"$HWMON_MODULES\"" >> "$CONFIG" diff --git a/sensord.service b/sensord.service new file mode 100644 index 0000000..cf4e4b3 --- /dev/null +++ b/sensord.service @@ -0,0 +1,12 @@ +[Unit] +Description=Hardware Monitoring Data Logger +After=lm_sensors.service + +[Service] +EnvironmentFile=-/etc/sysconfig/sensord +Type=forking +PIDFile=/var/run/sensord.pid +ExecStart=/usr/libexec/lm_sensors/sensord-service-wrapper + +[Install] +WantedBy=multi-user.target