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

Michal Hlavinka mhlavink at fedoraproject.org
Mon Apr 16 12:09:10 UTC 2012


commit f2468f46ceb62825037f58921b1b0b07c6847ac4
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Mon Apr 16 14:09:05 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 5a2bca2..e7f72e8 100644
--- a/nut.spec
+++ b/nut.spec
@@ -14,7 +14,7 @@
 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)
@@ -25,6 +25,7 @@ Source2: ups.sysconfig
 Source3: nut-client.tmpfiles
 
 Patch1: nut-2.6.3-fixbuild.patch
+Patch2: nut-2.6.3-tmpfiles.patch
 
 Requires: nut-client => 2.6.0
 Requires(pre): shadow-utils udev
@@ -125,6 +126,7 @@ necessary to develop NUT client applications.
 %prep
 %setup -q
 %patch1 -p1 -b .fixbuild
+%patch2 -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
@@ -403,6 +405,9 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/libupsclient.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)
+
 * Fri Jan 13 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