rpms/nut/F-13 nut-2.4.3-portcrash.patch, NONE, 1.1 nut.spec, 1.82, 1.83 ups.init, 1.12, 1.13
Michal Hlavinka
mhlavink at fedoraproject.org
Mon Jul 26 11:17:41 UTC 2010
- Previous message: rpms/php-pecl-imagick/devel .cvsignore, 1.3, 1.4 php-pecl-imagick.spec, 1.7, 1.8 sources, 1.3, 1.4
- Next message: rpms/nut/F-12 nut-2.4.3-portcrash.patch, NONE, 1.1 nut.spec, 1.82, 1.83 ups.init, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mhlavink
Update of /cvs/pkgs/rpms/nut/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv17839
Modified Files:
nut.spec ups.init
Added Files:
nut-2.4.3-portcrash.patch
Log Message:
* Mon Jul 26 2010 Michal Hlavinka <mhlavink at redhat.com> - 2.4.3-5
- fix crash when port= is ommited (#616375)
- fix issue where nut fails to restart because it did not finished termination
yet and old instance blocks devices (#193058)
nut-2.4.3-portcrash.patch:
upsdrvctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE nut-2.4.3-portcrash.patch ---
~/cvsf/nut/devel ~/cvsf/nut/devel
diff -up nut-2.4.3/drivers/upsdrvctl.c.portcrash nut-2.4.3/drivers/upsdrvctl.c
--- nut-2.4.3/drivers/upsdrvctl.c.portcrash 2010-07-26 11:38:19.830941009 +0200
+++ nut-2.4.3/drivers/upsdrvctl.c 2010-07-26 11:39:32.302764246 +0200
@@ -131,7 +131,7 @@ static void stop_driver(const ups_t *ups
ups->driver, ups->upsname);
ret = stat(pidfn, &fs);
- if (ret != 0) {
+ if ((ret != 0) && (ups->port != NULL)) {
snprintf(pidfn, sizeof(pidfn), "%s/%s-%s.pid", altpidpath(),
ups->driver, xbasename(ups->port));
ret = stat(pidfn, &fs);
Index: nut.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nut/F-13/nut.spec,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -p -r1.82 -r1.83
--- nut.spec 26 Mar 2010 12:16:21 -0000 1.82
+++ nut.spec 26 Jul 2010 11:17:40 -0000 1.83
@@ -9,7 +9,7 @@
Summary: Network UPS Tools
Name: nut
Version: 2.4.3
-Release: 3%{?dist}
+Release: 5%{?dist}
Group: Applications/System
License: GPLv2+
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -26,9 +26,12 @@ Patch1: nut-2.2.2-halpath.patch
#from upstream, required for nut <= 2.4.3, bz#575334
Patch2: nut-2.4.3-bz575334.patch
-#sent upstream, rhbz#573806
+# sent upstream, for nut<=2.4.3, rhbz#573806
Patch3: nut-2.4.3-udev.patch
+# for nut <= 2.4.3, rhbz#616375
+Patch4: nut-2.4.3-portcrash.patch
+
Requires: nut-client => 2.4.0 hal
Requires(pre): hal
Requires(post): fileutils chkconfig initscripts
@@ -124,6 +127,7 @@ necessary to develop NUT client applicat
%patch1 -p1 -b .halpath
%patch2 -p1 -b .bz575334
%patch3 -p1 -b .udevpatch
+%patch4 -p1 -b .portcrash
%build
autoreconf -i
@@ -308,6 +312,7 @@ rm -rf %{buildroot}
%{_mandir}/man8/usbhid-ups.8.gz
%files client
+%doc COPYING
%defattr(-,root,root)
%attr(755,root,root) %{initdir}/ups
%dir %{_sysconfdir}/ups
@@ -364,6 +369,14 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/libupsclient.pc
%changelog
+* Mon Jul 26 2010 Michal Hlavinka <mhlavink at redhat.com> - 2.4.3-5
+- fix crash when port= is ommited (#616375)
+- fix issue where nut fails to restart because it did not finished termination
+ yet and old instance blocks devices (#193058)
+
+* Fri Jul 07 2010 Michal Hlavinka <mhlavink at redhat.com> - 2.4.3-4
+- follow licensing guideline update
+
* Fri Mar 26 2010 Michal Hlavinka <mhlavink at redhat.com> - 2.4.3-3
- replace BUS with SUBSYSTEMS in udev rules (#573806)
Index: ups.init
===================================================================
RCS file: /cvs/pkgs/rpms/nut/F-13/ups.init,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -p -r1.12 -r1.13
--- ups.init 5 Nov 2009 11:00:01 -0000 1.12
+++ ups.init 26 Jul 2010 11:17:40 -0000 1.13
@@ -51,14 +51,14 @@ start() {
echo
echo -n $"Starting UPS monitor (master): "
- daemon /usr/sbin/upsmon > /dev/null 2>&1 && success || failure
+ daemon --pidfile /var/run/nut/upsmon.pid /usr/sbin/upsmon > /dev/null 2>&1 && success || failure
if [ "$RETVAL" = 0 ]; then
RETVAL=$?
fi
echo
else
echo -n $"Starting UPS monitor (slave): "
- daemon /usr/sbin/upsmon > /dev/null 2>&1 && success || failure
+ daemon --pidfile /var/run/nut/upsmon.pid /usr/sbin/upsmon > /dev/null 2>&1 && success || failure
echo
fi
@@ -67,7 +67,7 @@ start() {
stop() {
echo -n $"Stopping UPS monitor: "
- killproc upsmon
+ killproc -p /var/run/nut/upsmon.pid upsmon
echo
if [ "$SERVER" = "yes" ]; then
@@ -89,6 +89,12 @@ stop() {
restart() {
stop
+ waitmore=5
+ while [ -n "$(ls /var/run/nut/)" -a $waitmore -ge 1 ]
+ do
+ sleep 1
+ waitmore=$((waitmore-1))
+ done
start
}
- Previous message: rpms/php-pecl-imagick/devel .cvsignore, 1.3, 1.4 php-pecl-imagick.spec, 1.7, 1.8 sources, 1.3, 1.4
- Next message: rpms/nut/F-12 nut-2.4.3-portcrash.patch, NONE, 1.1 nut.spec, 1.82, 1.83 ups.init, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list