Bug 69097 - systemctl start should run "systemd-tmpfiles --create" automatically
Summary: systemctl start should run "systemd-tmpfiles --create" automatically
Status: RESOLVED WONTFIX
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-08 12:58 UTC by Pacho Ramos
Modified: 2015-05-02 11:15 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Pacho Ramos 2013-09-08 12:58:26 UTC
Sometimes I see a service fails to start and, finally, it is caused by simply needing to get some files/dirs created by "systemd-tmpfiles --create". Wouldn't be possible to make systemctl start do that? Thanks a lot
Comment 1 Lennart Poettering 2013-09-09 17:26:36 UTC
Similar atomicity concerns apply here as for https://bugs.freedesktop.org/show_bug.cgi?id=69096 (especailly as --create can be destructive by truncating files).

Note that tmpfiles is designed to be run at boot-up (and possibly package installation time), but not each time a service is started (this is for security reasons as creating fixed name dirs in /tmp is only safe if it is done before the first user logs in).

Also, there is currently no explicit connection between tmpfiles snippets in unit files.

We generally recommend packagers to invoke tmpfiles in the postinst scripts of the package. For RPM we even provide a spec file snippet for that in %tmpfiles_create.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.