I'm having a hard time getting a tmpfiles.d config file to create a directory under /run
. If I run systemd-tmpfiles --create
the dir gets created, but it's not there after a reboot.
So to try figure out what's going on, I want to turn on debug for when the systemd-tmpfiles-setup.service
runs. So I added a drop in file to set the SYSTEMD_LOG_LEVEL
environment var on the service. (I see this is recommended by a redhat document)
# /etc/systemd/system/systemd-tmpfiles-setup.service.d/override.conf
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
Reboot... Nothing in the logs.
If I run it manually, then I get debug output:
SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --create
Looking for configuration files in (higher priority first):
/etc/tmpfiles.d
/run/tmpfiles.d
/usr/local/lib/tmpfiles.d
/usr/lib/tmpfiles.d
/lib/tmpfiles.d
Skipping overridden file '/usr/lib/tmpfiles.d/screen-cleanup.conf'.
Reading config file "/etc/tmpfiles.d/bpm-vnc.conf"…
Reading config file "/usr/lib/tmpfiles.d/colord.conf"…
Reading config file "/usr/lib/tmpfiles.d/cryptsetup.conf"…
<snip lots of debug logs>
But if I run it manually, and pipe the output, I get no debug logs:
# SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --create 2>&1 | tee
<No output>
It seems that it's maybe detecting if the output is a tty, and turning off the debug logging if it's not a tty.
Any idea how to get debug logs from systemd-tmpfiles when run as a service?
....
0 Answers