diff options
author | Jaime Caamaño Ruiz <jcaamano@suse.com> | 2019-06-10 18:58:11 +0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-06-10 13:47:50 -0700 |
commit | 0186c3807cc4500c5699fcf034df3a995c34885c (patch) | |
tree | f51d282f58ed79fd5f590434f5d2e0f5e73ab3e0 /rhel | |
parent | cdce093e69f4cce587bbebb59a6c0e5e10f9eccc (diff) | |
download | openvswitch-0186c3807cc4500c5699fcf034df3a995c34885c.tar.gz |
rhel: set useropts optional for ovsdb-server
systemd assesses the presssence of all EnvironmentFile before execution
of Exec* directives, thus useropts needs to be optional even though it
will always be created at ExecStartPre.
Fixes: 94e1e8be3187 ("rhel: run ovn with the same user as ovs")
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'rhel')
-rw-r--r-- | rhel/usr_lib_systemd_system_ovsdb-server.service | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service index 9bb37fd06..3ca813d04 100644 --- a/rhel/usr_lib_systemd_system_ovsdb-server.service +++ b/rhel/usr_lib_systemd_system_ovsdb-server.service @@ -14,7 +14,7 @@ EnvironmentFile=-/etc/sysconfig/openvswitch ExecStartPre=/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch.useropts; /usr/bin/echo "OVS_USER_ID=${OVS_USER_ID}" > /run/openvswitch.useropts' ExecStartPre=/bin/sh -c 'if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVS_USER_OPT=--ovs-user=${OVS_USER_ID}" >> /run/openvswitch.useropts; fi' -EnvironmentFile=/run/openvswitch.useropts +EnvironmentFile=-/run/openvswitch.useropts ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ --no-ovs-vswitchd --no-monitor --system-id=random \ ${OVS_USER_OPT} \ |