]> git.ipfire.org Git - thirdparty/systemd.git/commit
manager: remove transient unit directory during startup
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 4 Apr 2023 10:05:16 +0000 (12:05 +0200)
committerMike Yuan <me@yhndnzj.com>
Tue, 4 Apr 2023 14:33:20 +0000 (22:33 +0800)
commit45f540a2974dc732820d20a0e73cfffc94766a70
treee362a8bc61fcbd11c89f8e9a615fe014ce5a65d5
parenta23d80d322c90593ad9546b2437290bd49c9f101
manager: remove transient unit directory during startup

I was testing transient units and user@.service crashed. I restarted it, and
tried to create a transient unit. It failed because
/run/user/1000/systemd/transient/ remained after the previous aborted run:
  Failed to start transient service unit: Unit run-u0.service was already loaded or has a fragment file.

Remove the directory during initial startup so we don't get confused by our own
files.
src/core/manager.c