Bug 968374 - systemd-tmpfiles doesn't accept relative paths to configuration files
systemd-tmpfiles doesn't accept relative paths to configuration files
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: systemd-maint
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-29 10:55 EDT by Jakub Filak
Modified: 2016-11-30 19:44 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-23 11:47:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A proposed patch for solution 1 from comment #0 (1.73 KB, patch)
2013-05-29 10:55 EDT, Jakub Filak
no flags Details | Diff

  None (edit)
Description Jakub Filak 2013-05-29 10:55:59 EDT
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):
systemd-204-2.el7.1.x86_64

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
Comment 2 Lukáš Nykrýn 2013-07-23 11:47:24 EDT
Documented in tmpfiles.d(5).
Comment 3 Jakub Filak 2013-07-23 12:14:21 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.