This commit is contained in:
parent
9ce9278b9d
commit
642b8fe234
@ -53,35 +53,6 @@ Index: prog/detect/sensors-detect
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- prog/detect/sensors-detect.orig
|
--- prog/detect/sensors-detect.orig
|
||||||
+++ prog/detect/sensors-detect
|
+++ prog/detect/sensors-detect
|
||||||
@@ -5551,7 +5551,7 @@ sub generate_modprobes
|
|
||||||
$modprobes .= "# I2C adapter drivers\n" if $nr;
|
|
||||||
for ($i = 0; $i < $nr; $i++) {
|
|
||||||
foreach $adap (@i2c_adapters) {
|
|
||||||
- next unless exists $adap->{nr_later} and $adap->{nr_later} == $i;
|
|
||||||
+ next unless exists $adap->{driver} and $adap->{nr_later} == $i;
|
|
||||||
if ($adap->{driver} eq "UNKNOWN") {
|
|
||||||
$modprobes .= "# modprobe unknown adapter ".$adap->{name}."\n";
|
|
||||||
} elsif ($adap->{driver} eq "DISABLED") {
|
|
||||||
@@ -5583,6 +5583,19 @@ sub generate_modprobes
|
|
||||||
next if not @{$chip->{detected}};
|
|
||||||
if ($chip->{driver} eq "to-be-written") {
|
|
||||||
$modprobes .= "# no driver for $chip->{detected}[0]{chipname} yet\n";
|
|
||||||
+ } elsif ($chip->{driver} eq "w83627hf") {
|
|
||||||
+ my $check = 0;
|
|
||||||
+ open MODPROBE, "modprobe -l w83627hf|" or die "can not execute modprobe\n";
|
|
||||||
+ while (<MODPROBE>) {
|
|
||||||
+ $check = /^.*w83627hf.*$/;
|
|
||||||
+ }
|
|
||||||
+ close MODPROBE;
|
|
||||||
+ if ($check) {
|
|
||||||
+ $modprobes .= "modprobe $chip->{driver}\n";
|
|
||||||
+ } else {
|
|
||||||
+ $modprobes .= "# no driver for ".$chip->{detected}[0]{chipname}." using w83781d\n";
|
|
||||||
+ $modprobes .= "modprobe w83781d\n"
|
|
||||||
+ }
|
|
||||||
} else {
|
|
||||||
# need the * for 2.4 kernels, won't necessarily be an exact match
|
|
||||||
open(local *INPUTFILE, "modprobe -l $chip->{driver}\\* 2>/dev/null |");
|
|
||||||
@@ -5927,6 +5940,8 @@ EOT
|
@@ -5927,6 +5940,8 @@ EOT
|
||||||
print "Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors\n".
|
print "Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors\n".
|
||||||
"for initialization at boot time.\n"
|
"for initialization at boot time.\n"
|
||||||
@ -326,201 +297,3 @@ Index: prog/init/lm_sensors.init.suse
|
|||||||
|
|
||||||
-exit $RETVAL
|
-exit $RETVAL
|
||||||
+rc_exit
|
+rc_exit
|
||||||
Index: prog/init/sensord.init
|
|
||||||
===================================================================
|
|
||||||
--- prog/init/sensord.init.orig
|
|
||||||
+++ prog/init/sensord.init
|
|
||||||
@@ -1,130 +1,84 @@
|
|
||||||
-#!@BASH@
|
|
||||||
+#!/bin/bash
|
|
||||||
#
|
|
||||||
-# @INITRDDIR@/sensord
|
|
||||||
-#
|
|
||||||
-# sensord This shell script takes care of starting and stopping
|
|
||||||
-# sensord, the lm_sensors hardware health monitoring daemon.
|
|
||||||
-#
|
|
||||||
-# Here is the sensors service for SysV init, based on lm_sensors-2.5.5-sensors
|
|
||||||
-# from Mandrake lm_sensors source RPM. It is modified according to recommendations
|
|
||||||
-# for RedHat initscripts. The drivers starting part is taken from alsasound
|
|
||||||
-# service. To configure this service one should put appropriate "alias i2c-bus-0
|
|
||||||
-# xxx" and "alias i2c-sensors-chip-0 xxx" in /etc/modules.conf. The rest should be
|
|
||||||
-# self explaining.
|
|
||||||
-#
|
|
||||||
-# You put it into /etc/rc.d/init.d/, you make a symlink (probably using
|
|
||||||
-# chkconfig, ntsysv, tksysv or serviceconf program) named S95xxx and K05xxx
|
|
||||||
-# into /etc/rc#.d (where # is the number of runlevel), and sensors service
|
|
||||||
-# (which starts lm_sensors modules, runs sensors -s and starts sensord)
|
|
||||||
-# will be started automatically at startup/reboot and stopped at shutdown.
|
|
||||||
-# One could also start/stop service manually.
|
|
||||||
-#
|
|
||||||
-# This service was tested for RedHat 7.2 only.
|
|
||||||
-# Jakub Narêbski, Poland
|
|
||||||
+# /etc/init.d/sensord
|
|
||||||
#
|
|
||||||
+### BEGIN INIT INFO
|
|
||||||
+# Provides: sensors
|
|
||||||
+# Required-Start: $remote_fs
|
|
||||||
+# Required-Stop: $remote_fs
|
|
||||||
+# Default-Start: 2 3 5
|
|
||||||
+# Default-Stop:
|
|
||||||
+# Short-Description: Hardware monitoring daemon
|
|
||||||
+# Description: This shell script takes care of starting and stopping
|
|
||||||
+# sensord, the lm_sensors hardware health monitoring daemon.
|
|
||||||
+### END INIT INFO
|
|
||||||
|
|
||||||
-# chkconfig: 2345 05 95
|
|
||||||
-# processname: sensord
|
|
||||||
-# config: @SYSCONFDIR@/sensors.conf
|
|
||||||
-# pidfile: /var/run/sensord.pid
|
|
||||||
-# description: Sensors is a sensors daemon which can be used to alert you \
|
|
||||||
-# in the event of a hardware health monitoring alarm.
|
|
||||||
|
|
||||||
# Source function library.
|
|
||||||
-. @INITRDDIR@/functions
|
|
||||||
-
|
|
||||||
-# Set default return value to 0 (success)
|
|
||||||
-RETVAL=0
|
|
||||||
-# Add @SBINDIR@ (sensord) and @BINDIR@ (sensors) to PATH if necessary
|
|
||||||
-echo "$PATH" | grep -q @SBINDIR@ || PATH=$PATH:@SBINDIR@
|
|
||||||
-echo "$PATH" | grep -q @BINDIR@ || PATH=$PATH:@BINDIR@
|
|
||||||
-export PATH
|
|
||||||
+. /etc/rc.status
|
|
||||||
|
|
||||||
# Modules to load from modules.conf (modules configuration)
|
|
||||||
-i2c_bus_drivers=´modprobe -c | \
|
|
||||||
- awk ´/^[[:space:]]*alias[[:space:]]+i2c-bus-[[:digit:]]/ { print $3 }´´
|
|
||||||
-i2c_chip_drivers=´modprobe -c | \
|
|
||||||
- awk ´/^[[:space:]]*alias[[:space:]]+i2c-sensors-chip-[[:digit:]]/ { print $3
|
|
||||||
-}´´
|
|
||||||
+i2c_bus_drivers=`modprobe -c | \
|
|
||||||
+ awk '/^[[:space:]]*alias[[:space:]]+i2c-bus-[[:digit:]]/ { print $3 }'`
|
|
||||||
+i2c_chip_drivers=`modprobe -c | \
|
|
||||||
+ awk '/^[[:space:]]*alias[[:space:]]+i2c-sensors-chip-[[:digit:]]/ { print $3 }'`
|
|
||||||
|
|
||||||
# Configuration of sensord
|
|
||||||
interval=1m # interval between scanning for sensor alarms
|
|
||||||
log_interval=30m # interval between logging all sensor readings
|
|
||||||
|
|
||||||
-# Check that we use kernel for which lm_sensors-drivers was installed
|
|
||||||
-[ ´uname -r´ = @MVERSION@ ] || exit 0
|
|
||||||
-
|
|
||||||
# Check that lm_sensors is installed.
|
|
||||||
-[ -x @SBINDIR@/sensord ] || exit 0
|
|
||||||
-[ -x @BINDIR@/sensors ] || exit 0
|
|
||||||
-
|
|
||||||
-echo_status()
|
|
||||||
-{
|
|
||||||
- if [ $1 -eq 0 ]; then
|
|
||||||
- echo_success
|
|
||||||
- else
|
|
||||||
- echo_failure
|
|
||||||
- fi
|
|
||||||
- echo
|
|
||||||
-}
|
|
||||||
+[ -x /usr/sbin/sensord ] || exit 0
|
|
||||||
+[ -x /usr/bin/sensors ] || exit 0
|
|
||||||
|
|
||||||
start()
|
|
||||||
{
|
|
||||||
# Start modules
|
|
||||||
echo "Starting I2C bus (adapter) drivers: "
|
|
||||||
for driver in $i2c_bus_drivers; do
|
|
||||||
- echo -n "Starting I2C driver: $driver "
|
|
||||||
- /sbin/modprobe ´echo $driver´
|
|
||||||
- echo_status $?
|
|
||||||
+ /sbin/modprobe $driver &> /dev/null
|
|
||||||
+ rc_status
|
|
||||||
done
|
|
||||||
+ rc_status -v
|
|
||||||
+
|
|
||||||
echo "Starting I2C chip (sensors) drivers: "
|
|
||||||
for driver in $i2c_chip_drivers; do
|
|
||||||
- echo -n "Starting I2C driver: $driver "
|
|
||||||
- /sbin/modprobe $(echo $driver)
|
|
||||||
- echo_status $?
|
|
||||||
+ /sbin/modprobe $driver &> /dev/null
|
|
||||||
+ rc_status
|
|
||||||
done
|
|
||||||
+ rc_status -v
|
|
||||||
+
|
|
||||||
# Set Alarm
|
|
||||||
echo -n "Configuring sensors: "
|
|
||||||
- sensors -s && sleep 2
|
|
||||||
+ sensors -s
|
|
||||||
+ rc_status && sleep 2
|
|
||||||
+ rc_status -v
|
|
||||||
+
|
|
||||||
echo_status $?
|
|
||||||
# Start daemons.
|
|
||||||
echo -n $"Starting sensord: "
|
|
||||||
- daemon sensord -i $interval -l $log_interval
|
|
||||||
- RETVAL=$?
|
|
||||||
-
|
|
||||||
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sensord
|
|
||||||
-
|
|
||||||
- echo
|
|
||||||
- return $RETVAL
|
|
||||||
+ startproc /usr/sbin/sensord -i $interval -l $log_interval
|
|
||||||
+ rc_status -v && touch /var/lock/subsys/sensord
|
|
||||||
}
|
|
||||||
|
|
||||||
stop()
|
|
||||||
{
|
|
||||||
# Stop daemons.
|
|
||||||
echo -n $"Shutting down sensord: "
|
|
||||||
- killproc sensord
|
|
||||||
- RETVAL=$?
|
|
||||||
+ killproc /usr/sbin/sensord
|
|
||||||
+ rc_status -v
|
|
||||||
|
|
||||||
- echo
|
|
||||||
# Remove modules
|
|
||||||
- drivers=´echo "$i2c_chip_drivers $i2c_bus_drivers" | \
|
|
||||||
- tr -s "[:space:]\n" " "´
|
|
||||||
- echo -n "Removing I2C drivers: $drivers"
|
|
||||||
- /sbin/modprobe -r -q $drivers
|
|
||||||
- echo_status $?
|
|
||||||
-
|
|
||||||
- echo
|
|
||||||
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sensord
|
|
||||||
-
|
|
||||||
- return $RETVAL
|
|
||||||
+ echo -n "Removing I2C drivers: " $i2c_chip_drivers $i2c_bus_drivers
|
|
||||||
+ /sbin/modprobe -r -q $i2c_chip_drivers $i2c_bus_drivers
|
|
||||||
+ rc_status -v && rm -f /var/lock/subsys/sensord
|
|
||||||
}
|
|
||||||
|
|
||||||
reload()
|
|
||||||
{
|
|
||||||
# Reread configuration file
|
|
||||||
sensors -s
|
|
||||||
-
|
|
||||||
- return $?
|
|
||||||
+ rc_status
|
|
||||||
}
|
|
||||||
|
|
||||||
# See how we were called.
|
|
||||||
@@ -135,9 +89,6 @@ case "$1" in
|
|
||||||
stop)
|
|
||||||
stop
|
|
||||||
;;
|
|
||||||
- status)
|
|
||||||
- status sensord
|
|
||||||
- ;;
|
|
||||||
restart)
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
@@ -145,11 +96,11 @@ case "$1" in
|
|
||||||
reload)
|
|
||||||
reload
|
|
||||||
;;
|
|
||||||
- condrestart)
|
|
||||||
+ try-restart)
|
|
||||||
[ -e /var/lock/subsys/sensord ] && restart || :
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
- echo "Usage: sensord {start|stop|restart|reload|condrestart|status}"
|
|
||||||
+ echo "Usage: sensord {start|stop|restart|reload|try-restart|status}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 22 11:31:49 CET 2007 - jdelvare@suse.de
|
||||||
|
|
||||||
|
- Drop local changes to sensors-detect that are no longer relevant.
|
||||||
|
- Drop local changes to sensord.init: we no longer package it.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 21 11:06:06 CET 2007 - jdelvare@suse.de
|
||||||
|
|
||||||
|
- Add missing Requires to libsensors3-devel. This is a cosmetic
|
||||||
|
change only, as the requirement was already drawn indirectly.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Nov 5 13:45:24 CET 2007 - jdelvare@suse.de
|
Mon Nov 5 13:45:24 CET 2007 - jdelvare@suse.de
|
||||||
|
|
||||||
|
10
sensors.spec
10
sensors.spec
@ -14,7 +14,7 @@ Name: sensors
|
|||||||
BuildRequires: bison flex rrdtool-devel sysfsutils
|
BuildRequires: bison flex rrdtool-devel sysfsutils
|
||||||
Url: http://www.lm-sensors.org/
|
Url: http://www.lm-sensors.org/
|
||||||
Version: 2.10.5
|
Version: 2.10.5
|
||||||
Release: 10
|
Release: 14
|
||||||
Summary: Hardware health monitoring for Linux
|
Summary: Hardware health monitoring for Linux
|
||||||
License: GPL v2 or later
|
License: GPL v2 or later
|
||||||
Group: System/Monitoring
|
Group: System/Monitoring
|
||||||
@ -98,6 +98,7 @@ Authors:
|
|||||||
Summary: Hardware health monitoring library
|
Summary: Hardware health monitoring library
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: libsensors3 = %{version}
|
Requires: libsensors3 = %{version}
|
||||||
|
Requires: sysfsutils
|
||||||
Provides: sensors:/usr/include/sensors/sensors.h
|
Provides: sensors:/usr/include/sensors/sensors.h
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
|
|
||||||
@ -199,7 +200,14 @@ rm -f $RPM_BUILD_ROOT/usr/src/linux/include/sensors.h
|
|||||||
%{_libdir}/libsensors.a
|
%{_libdir}/libsensors.a
|
||||||
%{_libdir}/libsensors.so
|
%{_libdir}/libsensors.so
|
||||||
%doc /usr/share/man/man3/*.3.gz
|
%doc /usr/share/man/man3/*.3.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 22 2007 - jdelvare@suse.de
|
||||||
|
- Drop local changes to sensors-detect that are no longer relevant.
|
||||||
|
- Drop local changes to sensord.init: we no longer package it.
|
||||||
|
* Wed Nov 21 2007 - jdelvare@suse.de
|
||||||
|
- Add missing Requires to libsensors3-devel. This is a cosmetic
|
||||||
|
change only, as the requirement was already drawn indirectly.
|
||||||
* Mon Nov 05 2007 - jdelvare@suse.de
|
* Mon Nov 05 2007 - jdelvare@suse.de
|
||||||
- Add split provides to subpackages libsensors3-devel and sensord
|
- Add split provides to subpackages libsensors3-devel and sensord
|
||||||
so that an update will work as designed.
|
so that an update will work as designed.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user