summaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2018-09-04 16:12:40 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-09-04 16:14:18 -0400
commitcdb64ac0d1f8f35e52bef18dd15ea25872fcf645 (patch)
tree5e18e715e3dfb4e728cd0892ed13ad880cce14fa /recipes-networking/openvswitch/openvswitch-git/systemd-create-runtime-dirs.patch
parente47cd6f12e91dfef4c874193b516869fbac4abda (diff)
downloadmeta-virtualization-cdb64ac0d1f8f35e52bef18dd15ea25872fcf645.tar.gz
openvswitch: fixup the ovsdb-server.service
The service currently fails to run since the runtime directories aren't being created. Create the runtime directories and fixup the path to echo to get things working again. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
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