Accepting request 210690 from Base:System
- Remove sysvinit support; none of target distributions use it anymore OBS-URL: https://build.opensuse.org/request/show/210690 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sensors?expand=0&rev=88
This commit is contained in:
commit
06645a6176
148
lm_sensors.init
148
lm_sensors.init
@ -1,148 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: lm_sensors
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 2 3 5
|
||||
# Default-Stop:
|
||||
# Short-Description: Load and configure hardware monitoring drivers
|
||||
# Description: sensors is used for monitoring motherboard sensor values.
|
||||
# Config file is /etc/sysconfig/lm_sensors
|
||||
### END INIT INFO
|
||||
#
|
||||
# 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., 51 Franklin Street, Fifth Floor, Boston,
|
||||
# MA 02110-1301 USA.
|
||||
|
||||
# See also the lm_sensors homepage at:
|
||||
# http://www.lm-sensors.org
|
||||
|
||||
# It uses a config file /etc/sysconfig/lm_sensors that contains the modules
|
||||
# to be loaded/unloaded. That file is sourced into this one.
|
||||
|
||||
# The format of that file a shell script that simply defines the modules
|
||||
# in order as normal shell variables with the special names:
|
||||
# MODULE_1, MODULE_2, MODULE_3, etc.
|
||||
|
||||
CONFIG=/etc/sysconfig/lm_sensors
|
||||
LOCK=/var/run/lm_sensors.lock
|
||||
PSENSORS=/usr/bin/sensors
|
||||
FANCONFIG=/etc/fancontrol
|
||||
PFAN=/usr/sbin/fancontrol
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.status
|
||||
|
||||
start() {
|
||||
echo -n "Starting up sensors"
|
||||
unset ${!MODULE_*}
|
||||
test -r "$CONFIG" && . "$CONFIG"
|
||||
|
||||
for i in ${!MODULE_*} ; do
|
||||
eval module=\$$i
|
||||
/sbin/modprobe $module &>/dev/null
|
||||
rc_status
|
||||
done
|
||||
rc_status
|
||||
|
||||
/usr/bin/sensors -s &> /dev/null
|
||||
rc_status
|
||||
|
||||
# Start fan control, if configured
|
||||
if test -s "$FANCONFIG" -a -x "$PFAN" ; then
|
||||
echo -n ", starting fan control: "
|
||||
/sbin/startproc -q "$PFAN"
|
||||
rc_status
|
||||
else
|
||||
echo -n ": "
|
||||
fi
|
||||
|
||||
rc_status -v && touch $LOCK
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Shutting down sensors"
|
||||
unset ${!MODULE_*}
|
||||
test -r "$CONFIG" && . "$CONFIG"
|
||||
|
||||
# Stop fan control, if it was started
|
||||
if test -s /var/run/fancontrol.pid ; then
|
||||
echo -n ", stopping fan control: "
|
||||
/sbin/killproc -TERM "$PFAN"
|
||||
rc_status
|
||||
else
|
||||
echo -n ": "
|
||||
fi
|
||||
|
||||
for i in ${!MODULE_*} ; do
|
||||
eval module=\$$i
|
||||
/sbin/modprobe -r $module &>/dev/null
|
||||
rc_status
|
||||
done
|
||||
|
||||
rc_status -v && rm -f $LOCK
|
||||
}
|
||||
|
||||
dostatus() {
|
||||
if test -s "$FANCONFIG" -a -x "$PFAN" ; then
|
||||
echo -n "Checking for fan control daemon: "
|
||||
/sbin/checkproc "$PFAN"
|
||||
rc_status -v
|
||||
fi
|
||||
|
||||
if test -e "$LOCK" ; then
|
||||
$PSENSORS
|
||||
else
|
||||
rc_failed 3
|
||||
fi
|
||||
rc_status
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
rc_status
|
||||
}
|
||||
|
||||
condrestart() {
|
||||
[ -e $LOCK ] && restart || :
|
||||
}
|
||||
|
||||
# Reset status of this service
|
||||
rc_reset
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
dostatus
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
try-restart)
|
||||
condrestart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: lm_sensors {start|stop|status|restart|reload|try-restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
rc_exit
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 23 15:38:06 UTC 2013 - p.drouand@gmail.com
|
||||
|
||||
- Remove sysvinit support; none of target distributions use it anymore
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 1 19:18:59 UTC 2013 - coolo@suse.com
|
||||
|
||||
|
51
sensors.spec
51
sensors.spec
@ -29,7 +29,6 @@ License: GPL-2.0+
|
||||
Group: System/Monitoring
|
||||
Requires: modutils
|
||||
Source0: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.bz2
|
||||
Source1: lm_sensors.init
|
||||
Source2: baselibs.conf
|
||||
Patch1: lm_sensors-3.1.1-build.patch
|
||||
Patch2: lm_sensors-3.0.0-sensord-separate.patch
|
||||
@ -37,7 +36,6 @@ Patch3: lm_sensors-3.0.0-sysconfig_metadata.patch
|
||||
Patch4: lm_sensors-3.0.3-hint-at-kernel-extra-package.patch
|
||||
Patch5: lm_sensors-r6181-fix-service-files.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExcludeArch: s390 s390x
|
||||
%{?systemd_requires}
|
||||
|
||||
@ -50,18 +48,6 @@ configuration in /etc/sensors.conf has to be checked and changed to fit
|
||||
the actual set up of the mainboard and the BIOS used on that specific
|
||||
mainboard!
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Simon G. Vogl <simon@tk.uni-linz.ac.at>
|
||||
Mark D. Studebaker <mds@eng.paradyne.com>
|
||||
Philip Edelbrock <phil@netroedge.com>
|
||||
Kyösti Mälkki <kmalkki@cc.hut.fi>
|
||||
Fons Rademakers <Fons.Rademakers@cern.ch>
|
||||
Frodo Looijaard <frodol@dds.nl>
|
||||
Geert Uytterhoeven <geert@linux-m68k.org>
|
||||
|
||||
%package -n sensord
|
||||
Summary: Hardware health monitoring daemon
|
||||
License: GPL-2.0+
|
||||
@ -75,12 +61,6 @@ round-robin database (RRD) and to alert when a sensor alarm is
|
||||
signalled; for example, if a fan fails, a temperature limit is
|
||||
exceeded, etc.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Merlin Hughes <merlin@merlin.org>
|
||||
|
||||
%package -n libsensors4
|
||||
Summary: Hardware health monitoring library
|
||||
License: LGPL-2.1+
|
||||
@ -93,17 +73,6 @@ controls how the different inputs are labeled and what scaling factors
|
||||
have to be applied for the specific hardware, so that the output makes
|
||||
sense to the user.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Mark D. Studebaker <mds@eng.paradyne.com>
|
||||
Philip Edelbrock <phil@netroedge.com>
|
||||
Kyösti Mälkki <kmalkki@cc.hut.fi>
|
||||
Frodo Looijaard <frodol@dds.nl>
|
||||
Jean Delvare <khali@linux-fr.org>
|
||||
Mark M. Hoffman <mhoffman@lightlink.com>
|
||||
|
||||
%package -n libsensors4-devel
|
||||
Summary: Hardware health monitoring library
|
||||
License: LGPL-2.1+
|
||||
@ -120,17 +89,6 @@ controls how the different inputs are labeled and what scaling factors
|
||||
have to be applied for the specific hardware, so that the output makes
|
||||
sense to the user.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Mark D. Studebaker <mds@eng.paradyne.com>
|
||||
Philip Edelbrock <phil@netroedge.com>
|
||||
Kyösti Mälkki <kmalkki@cc.hut.fi>
|
||||
Frodo Looijaard <frodol@dds.nl>
|
||||
Jean Delvare <khali@linux-fr.org>
|
||||
Mark M. Hoffman <mhoffman@lightlink.com>
|
||||
|
||||
%prep
|
||||
%setup -q -n lm_sensors-%{version}
|
||||
%patch1 -p1
|
||||
@ -156,11 +114,9 @@ make %{?_smp_mflags} PROG_EXTRA:=sensord BUILD_STATIC_LIB:=0 PREFIX=%{_prefix} M
|
||||
chmod -R u+rwX,g+rX,o+rX $RPM_BUILD_ROOT/%{_docdir}/sensors/
|
||||
cd ../
|
||||
chmod 0755 $RPM_BUILD_ROOT/%{_libdir}/libsensors.so.*
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
install -m 0755 %{S:1} $RPM_BUILD_ROOT/etc/init.d/lm_sensors
|
||||
ln -sf /etc/init.d/lm_sensors $RPM_BUILD_ROOT/usr/sbin/rclm_sensors
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
||||
cp -a prog/init/*.service $RPM_BUILD_ROOT/%{_unitdir}/
|
||||
ln -sf /sbin/service %{buildroot}/usr/sbin/rclm_sensors
|
||||
|
||||
%pre
|
||||
%service_add_pre lm_sensors.service
|
||||
@ -191,11 +147,9 @@ fi
|
||||
|
||||
%preun
|
||||
%service_del_preun lm_sensors.service
|
||||
%{stop_on_removal lm_sensors}
|
||||
|
||||
%postun
|
||||
%service_del_postun lm_sensors.service
|
||||
%{insserv_cleanup}
|
||||
|
||||
%post -n libsensors4 -p /sbin/ldconfig
|
||||
|
||||
@ -204,9 +158,8 @@ fi
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_unitdir}/lm_sensors.service
|
||||
%{_sbindir}/rclm_sensors
|
||||
%{_unitdir}/fancontrol.service
|
||||
/etc/init.d/lm_sensors
|
||||
/usr/sbin/rclm_sensors
|
||||
/usr/bin/*
|
||||
/usr/sbin/fancontrol
|
||||
%ifarch i386 i486 i586 i686 x86_64
|
||||
|
Loading…
Reference in New Issue
Block a user