summaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch')
-rw-r--r--recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch16
1 files changed, 10 insertions, 6 deletions
diff --git a/recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch b/recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch
index 244a216d..f7ec3fa0 100644
--- a/recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch
+++ b/recipes-networking/openvswitch/files/0001-ovs-use-run-instead-of-var-run-for-in-systemd-units.patch
@@ -1,6 +1,6 @@
1From ea98129777784b0e750a20078f01093dbdbe7b9b Mon Sep 17 00:00:00 2001 1From ae55fa8168b4b9692ad757c54255a89f935c587e Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Tue, 20 Oct 2020 14:14:06 +0800 3Date: Thu, 11 Mar 2021 11:35:24 +0800
4Subject: [PATCH] ovs: use /run instead of /var/run for in systemd units 4Subject: [PATCH] ovs: use /run instead of /var/run for in systemd units
5 5
6Upstream-Status: Pending 6Upstream-Status: Pending
@@ -78,10 +78,10 @@ index f88b57cae..82748bf2d 100644
78 EnvironmentFile=-/etc/sysconfig/openvswitch 78 EnvironmentFile=-/etc/sysconfig/openvswitch
79 EnvironmentFile=-/run/openvswitch.useropts 79 EnvironmentFile=-/run/openvswitch.useropts
80diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service 80diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service
81index 69b0bf61a..5f83f281f 100644 81index 74e5acb7f..39698f238 100644
82--- a/rhel/usr_lib_systemd_system_ovsdb-server.service 82--- a/rhel/usr_lib_systemd_system_ovsdb-server.service
83+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service 83+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service
84@@ -7,12 +7,12 @@ PartOf=openvswitch.service 84@@ -7,7 +7,7 @@ PartOf=openvswitch.service
85 85
86 [Service] 86 [Service]
87 Type=forking 87 Type=forking
@@ -90,13 +90,17 @@ index 69b0bf61a..5f83f281f 100644
90 Restart=on-failure 90 Restart=on-failure
91 EnvironmentFile=/etc/openvswitch/default.conf 91 EnvironmentFile=/etc/openvswitch/default.conf
92 EnvironmentFile=-/etc/sysconfig/openvswitch 92 EnvironmentFile=-/etc/sysconfig/openvswitch
93@@ -17,8 +17,8 @@ EnvironmentFile=-/run/openvswitch.useropts
94 # remove openvswitch.useropts first to reload a fresh
95 # OVS_USER_ID from default.conf or sysconfig.
96 ExecStartPre=/bin/rm -f /run/openvswitch.useropts
93-ExecStartPre=-/bin/mkdir /var/run/openvswitch /var/log/openvswitch 97-ExecStartPre=-/bin/mkdir /var/run/openvswitch /var/log/openvswitch
94-ExecStartPre=-/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch 98-ExecStartPre=-/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
95+ExecStartPre=-/bin/mkdir /run/openvswitch /var/log/openvswitch 99+ExecStartPre=-/bin/mkdir /run/openvswitch /var/log/openvswitch
96+ExecStartPre=-/bin/chown ${OVS_USER_ID} /run/openvswitch /var/log/openvswitch 100+ExecStartPre=-/bin/chown ${OVS_USER_ID} /run/openvswitch /var/log/openvswitch
97 ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch.useropts; /bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' 101 ExecStartPre=/bin/sh -c '/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts'
98 ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi' 102 ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi'
99 EnvironmentFile=-/run/openvswitch.useropts 103 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
100-- 104--
1012.17.1 1052.17.1
102 106