-   Linux - General (
-   -   systemd-tmpfiles : avoiding collisions (

genese 02-13-2020 07:05 PM

systemd-tmpfiles : avoiding collisions
Hello All,

I need a temporary directory in /run.

I'm going to create a foo.conf file in /etc/tmpfiles.d with the following content


d /run/bar 0755 user group
How do I make sure that /run/bar is not defined in another .conf (in /usr/lib/tmpfiles.d or elsewhere) ?

Is there an alternative to grep ?

If one day I install a new package which defines /run/bar in its .conf, the conflict will be reported in the logs, but I must confess that I don't read the logs at each reboot.

So something will break (either my scripts or the package, I didn't read the doc enough to tell it), with possible loss of data or DOS.

Is there any naming convention that solves this problem ?

TIA for any help.

ondoho 02-15-2020 06:39 AM


man tmpfiles.d
offer any insights?

MadeInGermany 02-18-2020 01:26 AM

No, the man page does not discuss conflicts.
This is a valid point.
In practice, the systemd-tmpfiles aborts all further activities when there is a duplicate.
And a duplicate might exist even in /etc/tmpfiles.d/systemd/system/ and (/usr)/lib/systemd/system/.

All times are GMT -5. The time now is 08:01 PM.