Red Hat Bugzilla – Bug 968374
systemd-tmpfiles doesn't accept relative paths to configuration files
Last modified: 2016-11-30 19:44:19 EST
Created attachment 754432 [details]
A proposed patch for solution 1 from comment #0
Description of problem:
If you want to test your new configuration file and you pass a relative file system path as the last argument of systemd-tmpfiles, systemd-tmpfiles prints the following message:
"Failed to open 'my_tmpfiles.conf', ignoring: No such file or directory"
The help text doesn't say that an absolute path is required.
$ systemd-tmpfiles --help
systemd-tmpfiles [OPTIONS...] [CONFIGURATION FILE...]
Creates, deletes and cleans up volatile and temporary files and directories.
-h --help Show this help
--create Create marked files/directories
--clean Clean up marked directories
--remove Remove marked files/directories
--prefix=PATH Only apply rules that apply to paths with the specified prefix
Version-Release number of selected component (if applicable):
Any one of these solutions would be fine:
1) if no standard tmpfiles directory contains the configuration file, systemd-tmpfiles tries to open the configuration file from the current directory.
2) more verbose help text
3) more precise error message
Documented in tmpfiles.d(5).
Thank you for taking the time to look at this bug!
I'm afraid that the right documentation is systemd-tmpfiles(8) because tmpfiles.d(5) describes only the configuration format and the purpose of files placed in the tmpfiles.d directories.