"%i" should be replaced by "%I" in /usr/portage/net-misc/openvpn/files/openvpn.service My open server config filename is "/etc/openvpn/server_tcp(Fpemud).conf". systemd names the service file as "/etc/systemd/system/multi-user.target.wants/openvpn@server_udp\x28Fpemud\x29.service", so openvpn can't find the correct config file. Reproducible: Always
From systemd.unit(5): │"%I" │ Unescaped instance name │ Same as "%i", but with │ │ │ │ escaping undone │ So that seems appropriate here.
Poke. This is an easy one. I have made an ebuild to fix it myself, it works well. https://github.com/fpemud/fpemud-workstation-local-overlay/tree/master/pkg-local/local-openvpn-fix I think there would be other service files that have the same problem, do you think there's any way for us to fix them together? Or we should file seperate bug report for each package when it occurs on our system.
Fixed without revbump; the number of affected users here is probably quite small. + 05 Nov 2014; Mike Gilbert <floppym@gentoo.org> files/openvpn.service: + Use unescaped instance name for PIDFile and config file, bug 527614.
Hello, This change breaks my config files, I use a company-type.conf openvpn file, and with %I systemd looks for "company/type.conf" file, obviously wrong. Please undo.
In your case, you should do "systemctl enable openvpn@company\\x2dtype", so it would be unescaped to "company-type". Example: fpemud-workstation / # systemd-escape --unescape company\\x2dtype company-type It is the standard systemd name pattern, you can check "\x2d" in "man systemd.unit" for more detail.
Right... we can either revert the change and not support certain characters in the config file name, or we can force people to escape their instance names as suggested in comment 5. Either way, somebody is inconvenienced. Using the escape mechanism is ultimately more flexible, so I would prefer to leave that in place.
Oh, come on. You prefer to support windows-like parentheses rather than classic unix dash ? Either way, systemd is just doing it plain wrong. On what right does it mess with the arguments given to an unit ? It should respect and work as shell expansion anyway: $ ls stuff-with-dash.txt stuff\(with\)\(lisp\).txt Parentheses are escaped. dashes aren't. Ergo, parentheses are the ones needed to be escaped. Oh, and it gets even better, as you have to pass your argument to the shell, not only do you have to escape the dash, but also the \ , as you wrote. company\\x2dtype Do you REALLY think people will work this out ???
At some point we should switch to using the unit files from upstream. These do not use %I for the instance name. https://github.com/OpenVPN/openvpn/tree/master/distro/systemd
(In reply to Mike Gilbert from comment #8) > At some point we should switch to using the unit files from upstream. These > do not use %I for the instance name. > > https://github.com/OpenVPN/openvpn/tree/master/distro/systemd I reported this issue as bug 531474
I note upstream use %i and not %I. Anyhow, on a global scale, I don't think the systemd escaping way is a good one. They replace dash with / , which seems pretty stupid/crazy/dump to me.
In this case it might be more appropriate to go with upstream's %i - which is also used by other distributions, e.g. Debian and OpenSuSE. (And ultimately migrate to upstream's service files).
(In reply to Matthias Maier from comment #11) > In this case it might be more appropriate to go with upstream's %i - which > is also used by other distributions, e.g. Debian and OpenSuSE. (And > ultimately migrate to upstream's service files). Agreed. I will revert.