[ovs-dev] [PATCH] rhel: fix rundir ownership

Flavio Leitner fbl at redhat.com
Tue Apr 28 02:01:09 UTC 2015


Although the ovs-ctl/ovs-lib takes care of creating the rundir,
it is correct to let the systemd manages the directory and let
the rpm know about the ownership too.

Signed-off-by: Flavio Leitner <fbl at redhat.com>
---
 rhel/openvswitch-fedora.spec.in                           | 1 +
 rhel/usr_lib_systemd_system_openvswitch-nonetwork.service | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 2ee76ca..2c6f6e9 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -260,6 +260,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc FAQ.md NEWS INSTALL.DPDK.md rhel/README.RHEL
 /var/lib/openvswitch
 /var/log/openvswitch
+%ghost %attr(755,root,root) %{_rundir}/openvswitch
 %exclude %{_bindir}/ovs-benchmark
 %exclude %{_bindir}/ovs-parse-backtrace
 %exclude %{_bindir}/ovs-pcap
diff --git a/rhel/usr_lib_systemd_system_openvswitch-nonetwork.service b/rhel/usr_lib_systemd_system_openvswitch-nonetwork.service
index 870b25e..e4c2a66 100644
--- a/rhel/usr_lib_systemd_system_openvswitch-nonetwork.service
+++ b/rhel/usr_lib_systemd_system_openvswitch-nonetwork.service
@@ -11,3 +11,5 @@ EnvironmentFile=-/etc/sysconfig/openvswitch
 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl start \
           --system-id=random $OPTIONS
 ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop
+RuntimeDirectory=openvswitch
+RuntimeDirectoryMode=0755
-- 
2.1.0




More information about the dev mailing list