]> git.ipfire.org Git - thirdparty/systemd.git/commit
vmspawn: Support RUNTIME_DIRECTORY again 41619/head
authorKai Lüke <kai@amutable.com>
Mon, 13 Apr 2026 12:21:39 +0000 (21:21 +0900)
committerKai Lüke <kai@amutable.com>
Mon, 13 Apr 2026 12:33:15 +0000 (21:33 +0900)
commit47237cf6238e5a8bcbd866cc091d9b1aa0d9c300
tree5a945aa67e3e418bdb8239bce279603bf1c183a2
parente700d5134df15a094a2c92bc61392fbaf3c0452b
vmspawn: Support RUNTIME_DIRECTORY again

In ccecae0efd ("vmspawn: use machine name in runtime directory path")
support for RUNTIME_DIRECTORY was dropped which makes it difficult to
run systemd-vmspawn in a service unit which doesn't have write access
to the regular /run but should use its own managed RUNTIME_DIRECTORY.
What worked before was --keep-unit --system but we can't use
XDG_RUNTIME_DIR and --user because then --keep-unit breaks which
we need because it can't create a scope as there is no session.
Switch back to runtime_directory which handles RUNTIME_DIRECTORY and
tells us whether we should use it as is without later cleanup or if we
need to use the regular path where we create and delete the directory
ourselves.
src/vmspawn/vmspawn.c