[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why do we have to support tmpfs for /var/run (policy changes in 3.8.1)



On Mon, 2009-04-06 at 20:42 +0200, Michael Biebl wrote:
> Steve Langasek wrote:
> > I think he's referring to the fact that the FHS requires all files in
> > /var/run to be cleared on boot.  We have an init script
> > (/etc/rcS.d/S36mountall-bootclean) that takes care of this at the system
> > level, though, on behalf of all packages; the trouble is it's a lot less
> > efficient, overall, to have to repeatedly clean /var/run on boot than it is
> > to just write it to a tmpfs and let the contents be lost on reboot.
> 
> I think that is one of them main questions:
> 
> Is it more efficient, to cleanup /var/tmp (i.e. remove everything besides
> directories) on boot in a single place (mountall-bootclean), or is it more
> efficient to use a tmpfs and let every package create it's run directory on boot.
> It's probably hard to tell without proper benchmarking.

Another possibility would be to recreate the directories
in /var/{run,lock} on boot in a centeral initscript. Each package could
ship a directory as template somewhere else which would be copied on
boot (after cleaning or mounting a tmpfs) to /var/{run,lock}. Or shell
script snippets could be used instead.

This would at least avoid having an initscript for the sole purpose of
creating those directories.

Jan


Reply to: