]> git.ipfire.org Git - thirdparty/systemd.git/commit
tmpfiles: when /etc is not fully initialized, some specifiers are expected to be...
authorFranck Bui <fbui@suse.com>
Thu, 16 Nov 2017 10:27:29 +0000 (11:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 16 Nov 2017 10:27:29 +0000 (11:27 +0100)
commit4cef1923571de409496567b2c4777aea4676ff00
tree26676632cd57502ad3a311568bacbe0e8c8c02dc
parent28abce5d25111571e89e3b1feb25033131d2ebfb
tmpfiles: when /etc is not fully initialized, some specifiers are expected to be unresolvable (#6860)

In chroot environments, /etc might not be fully initialized: /etc/machine-id
can be missing for example. This makes the expansions of affected specifiers
impossible at that time.

These cases should not be considered as errors and such failures shouldn't be
logged at an error level therefore this patch downgrades the level used to
LOG_NOTICE in such cases.

Also this is logged at LOG_NOTICE only the first time and then downgrade to
LOG_DEBUG for the rest. That way, if debugging is enabled we get the full
output, but otherwise we only see only one message.

The expansion of specifiers is now self contained in a dedicated function
instead of being spread all over the place.
src/tmpfiles/tmpfiles.c