From d47bcd19d1bdcdd9eec68b685a048a747e168636 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 16 Jan 2006 17:29:20 +0000 Subject: [PATCH] - fix subsys locking in the initscript --- lm_sensors.init | 6 +++--- lm_sensors.spec | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lm_sensors.init b/lm_sensors.init index f1e5daf..f872866 100755 --- a/lm_sensors.init +++ b/lm_sensors.init @@ -67,7 +67,7 @@ start() { $PSENSORS -s RETVAL=$? - if [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sensors ; then + if [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lm_sensors ; then echo_success echo else @@ -88,7 +88,7 @@ stop() { done RETVAL=$? - if [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sensors ; then + if [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/lm_sensors ; then echo_success echo else @@ -109,7 +109,7 @@ restart() { } condrestart() { - [ -e /var/lock/subsys/sensors ] && restart || : + [ -e /var/lock/subsys/lm_sensors ] && restart || : } # See how we were called. diff --git a/lm_sensors.spec b/lm_sensors.spec index 934b6a3..41c9cde 100644 --- a/lm_sensors.spec +++ b/lm_sensors.spec @@ -1,6 +1,6 @@ Name: lm_sensors Version: 2.9.1 -Release: 5.1 +Release: 6 URL: http://secure.netroedge.com/~lm78/ Source: http://secure.netroedge.com/~lm78/archive/lm_sensors-%{version}.tar.gz Source1: lm_sensors.sysconfig @@ -72,6 +72,11 @@ install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/lm_sensors %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -fr $RPM_BUILD_ROOT +%pre +if [ -f /var/lock/subsys/sensors ]; then + mv -f /var/lock/subsys/sensors /var/lock/subsys/lm_sensors +fi + %post /sbin/ldconfig /sbin/chkconfig --add lm_sensors @@ -102,7 +107,10 @@ fi %{_libdir}/lib*.so %changelog -* Fri Dec 16 2005 Jesse Keating +* Mon Jan 16 2006 Peter Jones 2.9.1-6 +- fix initscript subsys locking + +* Fri Dec 16 2005 Jesse Keating 2.9.1-5.1 - rebuilt for new gcj * Tue Nov 08 2005 Phil Knirsch 2.9.1-5