Tips on how to handle tmpfile changes

"Jóhann B. Guðmundsson" johannbg at gmail.com
Wed Dec 7 15:47:17 UTC 2011


On 12/07/2011 03:37 PM, Michael Cronenworth 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[1] 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?
> 2. The /etc/vnstat.conf variable change will break all upgrades, but
> could something like sed be run in a postinstall script to update the
> variable?
>
>
> [1] https://admin.fedoraproject.org/updates/vnstat-1.11-3.fc15
http://fedoraproject.org/wiki/Packaging:Tmpfiles.d


More information about the devel mailing list