summaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch')
-rw-r--r--recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch b/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
new file mode 100644
index 00000000..65290cf6
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
@@ -0,0 +1,31 @@
1From 219e7cf9f28fdf14747fdf674bec293f763fe8e3 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Tue, 4 Sep 2018 15:38:59 -0400
4Subject: [PATCH] systemd: create runtime dirs
5
6The recommendation would be to make use of "RuntimeDirectory=" and
7"RuntimeDirectoryMode=" instead of 'mkdir' and 'chown' but since the
8upstream service file uses 'chown' we will match this by using
9'mkdir'. Without this the service will fail to start since these
10directories won't exist.
11
12Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
13---
14 rhel/usr_lib_systemd_system_ovsdb-server.service | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service
18index 694598f..0bb2274 100644
19--- a/rhel/usr_lib_systemd_system_ovsdb-server.service
20+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service
21@@ -10,6 +10,7 @@ Type=forking
22 Restart=on-failure
23 EnvironmentFile=/etc/openvswitch/default.conf
24 EnvironmentFile=-/etc/sysconfig/openvswitch
25+ExecStartPre=-/bin/mkdir /var/run/openvswitch /var/log/openvswitch
26 ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
27 ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi'
28 EnvironmentFile=-/run/openvswitch/useropts
29--
302.7.4
31