]> git.ipfire.org Git - thirdparty/systemd.git/commit
run: tweak algorithm for generating unit name from dbus unique name
authorLennart Poettering <lennart@poettering.net>
Thu, 4 Mar 2021 15:23:46 +0000 (16:23 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 12 Mar 2021 16:35:57 +0000 (17:35 +0100)
commitfd441cc5471b51c0b2abad6842e3baaafce32cd6
tree612121eb5dcab069798b9922b92b40eb03f4a66d
parent02e9679cceeaa8f2fd7a9f2370f222be969ea1da
run: tweak algorithm for generating unit name from dbus unique name

This reverts behaviour of systemd-run's unit name generation to the
status quo ante of #18871: we chop off the ":1." prefix if we can.
However, to address the issue that the unique name can overrun we then
do what #18871 did as fallback: only chop off the ":" prefix.

This way we should have pretty names that look like they always looked
in the common case, but in the case of a unique name overrun we still
will have names that work.

Follow-up for #18871

(cherry picked from commit e6283cbf48a3821d03ec73252620fc1b04bd4588)
src/run/run.c