[nut] do not forget to create /var/run/nut before starting service (#812825)

Michal Hlavinka mhlavink at fedoraproject.org
Mon Apr 16 12:03:08 UTC 2012


commit e1a13ad4408473bacf40a4fd78a578afa6fe8069
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Mon Apr 16 14:03:02 2012 +0200

    do not forget to create /var/run/nut before starting service (#812825)

 nut-2.6.3-tmpfiles.patch |   11 +++++++++++
 nut.spec                 |    7 ++++++-
 2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/nut-2.6.3-tmpfiles.patch b/nut-2.6.3-tmpfiles.patch
new file mode 100644
index 0000000..85a1fc9
--- /dev/null
+++ b/nut-2.6.3-tmpfiles.patch
@@ -0,0 +1,11 @@
+diff -up nut-2.6.3/scripts/systemd/nut-monitor.service.in.tmpfiles nut-2.6.3/scripts/systemd/nut-monitor.service.in
+--- nut-2.6.3/scripts/systemd/nut-monitor.service.in.tmpfiles	2012-04-16 13:42:53.194693623 +0200
++++ nut-2.6.3/scripts/systemd/nut-monitor.service.in	2012-04-16 13:42:56.328714795 +0200
+@@ -3,6 +3,7 @@ Description=Network UPS Tools - power de
+ After=local-fs.target network.target nut-server.service
+ 
+ [Service]
++ExecStartPre=-/usr/bin/systemd-tmpfiles --create /etc/tmpfiles.d/nut-client.conf
+ ExecStart=/usr/sbin/upsmon
+ PIDFile=/var/run/nut/upsmon.pid
+ Type=forking
diff --git a/nut.spec b/nut.spec
index 4c26814..41db4a8 100644
--- a/nut.spec
+++ b/nut.spec
@@ -14,13 +14,14 @@
 Summary: Network UPS Tools
 Name: nut
 Version: 2.6.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 Group: Applications/System
 License: GPLv2+
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Url: http://www.networkupstools.org/
 Source: http://www.networkupstools.org/source/2.6/%{name}-%{version}.tar.gz
 Source3: nut-client.tmpfiles
+Patch1: nut-2.6.3-tmpfiles.patch
 
 Requires(pre): shadow-utils udev
 Requires(post): fileutils chkconfig 
@@ -108,6 +109,7 @@ necessary to develop NUT client applications.
 
 %prep
 %setup -q
+%patch1 -p1 -b .tmpfiles
 sed -i 's|=NUT-Monitor|=nut-monitor|'  scripts/python/app/nut-monitor.desktop
 sed -i "s|sys.argv\[0\]|'%{_datadir}/%{name}/nut-monitor/nut-monitor'|" scripts/python/app/NUT-Monitor
 sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient-config.in
@@ -481,6 +483,9 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/libnutscan.pc
 
 %changelog
+* Mon Apr 16 2012 Michal Hlavinka <mhlavink at redhat.com> - 2.6.3-2
+- do not forget to create /var/run/nut before starting service (#812825)
+
 * Thu Jan 05 2012 Michal Hlavinka <mhlavink at redhat.com> - 2.6.3-1
 - nut updated to 2.6.3
 


More information about the scm-commits mailing list