diff options
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.patch | 31 |
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 @@ | |||
1 | From 219e7cf9f28fdf14747fdf674bec293f763fe8e3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Tue, 4 Sep 2018 15:38:59 -0400 | ||
4 | Subject: [PATCH] systemd: create runtime dirs | ||
5 | |||
6 | The recommendation would be to make use of "RuntimeDirectory=" and | ||
7 | "RuntimeDirectoryMode=" instead of 'mkdir' and 'chown' but since the | ||
8 | upstream service file uses 'chown' we will match this by using | ||
9 | 'mkdir'. Without this the service will fail to start since these | ||
10 | directories won't exist. | ||
11 | |||
12 | Signed-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 | |||
17 | diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service | ||
18 | index 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 | -- | ||
30 | 2.7.4 | ||
31 | |||