Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 673438 - net-misc/openvswitch-2.10.0-r1 - bashisms in ovsdb-server.service
Summary: net-misc/openvswitch-2.10.0-r1 - bashisms in ovsdb-server.service
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Tiziano Müller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-19 14:57 UTC by Stefan Schmid
Modified: 2018-12-20 08:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schmid 2018-12-19 14:57:01 UTC
The Service-Unit "ovsdb-server.service" can not Start if dash the default ShellScript-Interpreter.

ERROR:
/bin/sh: 1: Bad substitution

Source of the error from "ovsdb-server.service":
...
ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi'
...

From LOG:
Dez 19 15:27:43 pc170am systemd[1]: Starting Open vSwitch Database Unit...
Dez 19 15:27:43 pc170am sh[11748]: /bin/sh: 1: Bad substitution
Dez 19 15:27:43 pc170am systemd[1]: ovsdb-server.service: Control process exited, code=exited status=2
Dez 19 15:27:43 pc170am systemd[1]: ovsdb-server.service: Failed with result 'exit-code'.
Dez 19 15:27:43 pc170am systemd[1]: Failed to start Open vSwitch Database Unit.

That aside, it's bad style in a service unit to use shell scripts. Especially if it also creates a dependency on a particular shell.
PS: Sorry for my bad English.
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2018-12-19 21:06:32 UTC
please test 2.10.1, I updated quite a few things with the systemd units.
Comment 2 Larry the Git Cow gentoo-dev 2018-12-19 21:07:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7750fade80482bf075e56f4eabd52423c314fe69

commit 7750fade80482bf075e56f4eabd52423c314fe69
Author:     Matthew Thode <prometheanfire@gentoo.org>
AuthorDate: 2018-12-19 21:06:12 +0000
Commit:     Matthew Thode <prometheanfire@gentoo.org>
CommitDate: 2018-12-19 21:06:56 +0000

    net-misc/openvswitch: 2.10.1 bump
    
    Closes: https://bugs.gentoo.org/673438
    Package-Manager: Portage-2.3.51, Repoman-2.3.12
    Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>

 net-misc/openvswitch/Manifest                      |   1 +
 ...s-vswitchd2.service => ovs-vswitchd-r2.service} |   0
 net-misc/openvswitch/files/ovs-vswitchd-r3.service |  26 ++++
 net-misc/openvswitch/files/ovs-vswitchd.confd-r2   |   7 +
 ...sdb-server2.service => ovsdb-server-r2.service} |   0
 net-misc/openvswitch/files/ovsdb-server-r3.service |  22 ++++
 net-misc/openvswitch/openvswitch-2.10.0-r1.ebuild  |   4 +-
 net-misc/openvswitch/openvswitch-2.10.1.ebuild     | 142 +++++++++++++++++++++
 8 files changed, 200 insertions(+), 2 deletions(-)
Comment 3 Stefan Schmid 2018-12-20 08:05:30 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #1)
> please test 2.10.1, I updated quite a few things with the systemd units.

I tried it and it works, thanks. :)