Tips on how to handle tmpfile changes
mzerqung at 0pointer.de
Tue Dec 13 14:13:18 UTC 2011
On Wed, 07.12.11 09:37, Michael Cronenworth (mike at cchtml.com) wrote:
> The vnstat service has traditionally run as the root user. This was
> fixed in Fedora 16 and higher to run as the vnstat user, but the same
> fix was just introduced into Fedora 15. There is a problem with this
> fix in that it requires "systemd-tmpfiles" to be run to create the new
> /run/vnstat directory required to store the pid file. This new directory
> also required the /etc/vnstat.conf file to be changed as the PidFile
> variable tells vnstat where to create the pid file. The end result is
> that after a package update the service will fail to start unless they
> manually create the /run/vnstat directory and update their config file.
> Not a very nice requirement IMO.
> 1. Is it appropriate for the RPM to call systemd-tmpfiles or is there a
> better way to create the new tmpfile directory?
Yes, systemd-tmpfiles is considered part of the systemd ABI and thus
stable and documented (systemd-tmpfiles(8)). If you want to run it from
a spec file, do so with a command line like this:
systemd-tmpfiles --create /usr/lib/tmpfiles.d/vnstat.conf
Lennart Poettering - Red Hat, Inc.
More information about the devel