]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit.c
core: never remove "transient" and "control" directories from unit search path
authorLennart Poettering <lennart@poettering.net>
Thu, 23 Nov 2017 16:45:58 +0000 (17:45 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 29 Nov 2017 11:34:12 +0000 (12:34 +0100)
commit45639f1be5f5aeea3c468abe69e38f68d52e39ee
tree374c13cb9c82712a798bf6f41dd8883aa8cf7965
parent45a7b16bae0dbda31caa54c608e72428cacdb6f4
core: never remove "transient" and "control" directories from unit search path

This changes the unit search path logic to never drop the transient and
control directories from the unit search path. This is necessary as we
add new entries to both during runtime, due to the "systemctl
set-property" and transient unit logic.

Previously, the "transient" directory was created during early boot to
deal with this, but the "control" directories were not covered like
that. Creating the control directories early at boot is not possible
however, as /etc might be read-only then, and we do define a persistent
control directory. Hence, let's create these dirs on-demand when we need
them, and make sure the search path clean-up logic never drops them from
the search path even if they are initially missing.

(Also, always create these paths properly labelled)
src/core/manager.c
src/core/unit.c
src/shared/path-lookup.c