[Openvpn-devel] Update systemd service name param to match command

Message ID 20250729180014.11550-2-sourceforge@terrance.allofti.me
State New
Headers show
Series [Openvpn-devel] Update systemd service name param to match command | expand

Commit Message

Terrance July 29, 2025, 6 p.m. UTC
From: Terrance <git@terrance.allofti.me>

The service name displays `%I` which invokes systemd's path mangling
(notably, converting `-` to `/`), suggesting you need to provide an
encoded parameter (via e.g. `systemd-escape`), but the start command
itself uses `%i` which doesn't do the conversion.

This updates the service name to match the start command.
---
Additional discussion: https://github.com/OpenVPN/openvpn/pull/802

 distro/systemd/openvpn-client@.service.in | 2 +-
 distro/systemd/openvpn-server@.service.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--
2.50.1

Comments

Frank Lichtenheld July 30, 2025, 9:30 a.m. UTC | #1
On Tue, Jul 29, 2025 at 07:00:05PM +0100, Terrance via Openvpn-devel wrote:
> From: Terrance <git@terrance.allofti.me>
> 
> The service name displays `%I` which invokes systemd's path mangling
> (notably, converting `-` to `/`), suggesting you need to provide an
> encoded parameter (via e.g. `systemd-escape`), but the start command
> itself uses `%i` which doesn't do the conversion.
> 
> This updates the service name to match the start command.

Change makes sense to me. I haven't specifically tested it but it only
changes the description so I don't see how it could break anything.

Acked-by: Frank Lichtenheld <frank@lichtenheld.com>

Regards,
Timo Rothenpieler July 30, 2025, 12:16 p.m. UTC | #2
On 29/07/2025 20:00, Terrance via Openvpn-devel wrote:
> From: Terrance <git@terrance.allofti.me>
> 
> The service name displays `%I` which invokes systemd's path mangling
> (notably, converting `-` to `/`), suggesting you need to provide an
> encoded parameter (via e.g. `systemd-escape`), but the start command
> itself uses `%i` which doesn't do the conversion.
> 
> This updates the service name to match the start command.

This makes me wonder if it isn't the one passed to the start command 
that's actually not what it was intended to be.

Cause using %I there would enable to put configs in subdirs. With %i 
that's impossible, since it can't contain slashes.

Patch

diff --git a/distro/systemd/openvpn-client@.service.in b/distro/systemd/openvpn-client@.service.in
index ae62e8c7..c32bb333 100644
--- a/distro/systemd/openvpn-client@.service.in
+++ b/distro/systemd/openvpn-client@.service.in
@@ -1,4 +1,4 @@ 
 [Unit]
-Description=OpenVPN tunnel for %I
+Description=OpenVPN tunnel for %i
 After=network-online.target
 Wants=network-online.target
diff --git a/distro/systemd/openvpn-server@.service.in b/distro/systemd/openvpn-server@.service.in
index 5123e072..547f5f54 100644
--- a/distro/systemd/openvpn-server@.service.in
+++ b/distro/systemd/openvpn-server@.service.in
@@ -1,4 +1,4 @@ 
 [Unit]
-Description=OpenVPN service for %I
+Description=OpenVPN service for %i
 After=network-online.target
 Wants=network-online.target