[systemd-devel] non-existent unit instances

Richard Hector richard at walnut.gen.nz
Sat Sep 5 06:46:02 UTC 2020


Hi all,

Quoting from another thread:

On 5/09/20 4:36 am, Lennart Poettering wrote:
> Unit instances can be activated on-the-fly without further prepartion
> or regsitration of the instance string or so. it's sufficient if the
> template unit exists.

Is that preventable?

I have some instance names that are easily typoed. When I start one with
the wrong name, it sticks around trying to restart for ever - or at
least till I notice it or reboot - where I'm much rather get an error
message and stop.

For reference, this is with the openvpn-client@ (and maybe
openvpn-server@) units in Debian buster. Some of the content was
modified/overwritten by me, so it could well be a bug introduced by me.

The typos are because my instances are based on hostname, which can
contain '-' but not '_'. Instance names can apparently not contain '-',
so I have to use '_' instead, but my muscle memory for my hostnames is
strong.

I don't know if this is a result of the way the units are written, or an
inherent issue with systemd.

Cheers,
Richard


More information about the systemd-devel mailing list