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:
Stephan Kulow 2013-12-13 11:00:53 +00:00 committed by Git OBS Bridge
commit 06645a6176
3 changed files with 7 additions and 197 deletions

View File

@ -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

View File

@ -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 Mon Jul 1 19:18:59 UTC 2013 - coolo@suse.com

View File

@ -29,7 +29,6 @@ License: GPL-2.0+
Group: System/Monitoring Group: System/Monitoring
Requires: modutils Requires: modutils
Source0: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.bz2 Source0: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.bz2
Source1: lm_sensors.init
Source2: baselibs.conf Source2: baselibs.conf
Patch1: lm_sensors-3.1.1-build.patch Patch1: lm_sensors-3.1.1-build.patch
Patch2: lm_sensors-3.0.0-sensord-separate.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 Patch4: lm_sensors-3.0.3-hint-at-kernel-extra-package.patch
Patch5: lm_sensors-r6181-fix-service-files.patch Patch5: lm_sensors-r6181-fix-service-files.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: s390 s390x ExcludeArch: s390 s390x
%{?systemd_requires} %{?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 the actual set up of the mainboard and the BIOS used on that specific
mainboard! 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 %package -n sensord
Summary: Hardware health monitoring daemon Summary: Hardware health monitoring daemon
License: GPL-2.0+ 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 signalled; for example, if a fan fails, a temperature limit is
exceeded, etc. exceeded, etc.
Authors:
--------
Merlin Hughes <merlin@merlin.org>
%package -n libsensors4 %package -n libsensors4
Summary: Hardware health monitoring library Summary: Hardware health monitoring library
License: LGPL-2.1+ 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 have to be applied for the specific hardware, so that the output makes
sense to the user. 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 %package -n libsensors4-devel
Summary: Hardware health monitoring library Summary: Hardware health monitoring library
License: LGPL-2.1+ 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 have to be applied for the specific hardware, so that the output makes
sense to the user. 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 %prep
%setup -q -n lm_sensors-%{version} %setup -q -n lm_sensors-%{version}
%patch1 -p1 %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/ chmod -R u+rwX,g+rX,o+rX $RPM_BUILD_ROOT/%{_docdir}/sensors/
cd ../ cd ../
chmod 0755 $RPM_BUILD_ROOT/%{_libdir}/libsensors.so.* 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} mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
cp -a prog/init/*.service $RPM_BUILD_ROOT/%{_unitdir}/ cp -a prog/init/*.service $RPM_BUILD_ROOT/%{_unitdir}/
ln -sf /sbin/service %{buildroot}/usr/sbin/rclm_sensors
%pre %pre
%service_add_pre lm_sensors.service %service_add_pre lm_sensors.service
@ -191,11 +147,9 @@ fi
%preun %preun
%service_del_preun lm_sensors.service %service_del_preun lm_sensors.service
%{stop_on_removal lm_sensors}
%postun %postun
%service_del_postun lm_sensors.service %service_del_postun lm_sensors.service
%{insserv_cleanup}
%post -n libsensors4 -p /sbin/ldconfig %post -n libsensors4 -p /sbin/ldconfig
@ -204,9 +158,8 @@ fi
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_unitdir}/lm_sensors.service %{_unitdir}/lm_sensors.service
%{_sbindir}/rclm_sensors
%{_unitdir}/fancontrol.service %{_unitdir}/fancontrol.service
/etc/init.d/lm_sensors
/usr/sbin/rclm_sensors
/usr/bin/* /usr/bin/*
/usr/sbin/fancontrol /usr/sbin/fancontrol
%ifarch i386 i486 i586 i686 x86_64 %ifarch i386 i486 i586 i686 x86_64