Web lists-archives.com

Re: Origin of /var/run contents




On Tue 27 Feb 2018 at 19:20:09 (+0100), Martin S. Weber wrote:
> On 2018-02-27 12:46:46, Gene Heskett wrote:
> > On Tuesday 27 February 2018 06:46:50 Martin S. Weber wrote:
> > 
> > > On 2018-02-27 05:03:15, Dave Sherohman wrote:
> > > > (...)
> > > > So, is there somewhere that /run is initially populated from,
> > > > (...)
> > >
> > > man 5 tmpfiles.d, see also its SEE ALSO.
> > >
> > > Regards,
> > > -Martin
> > 
> > Apparently new with jessie. But neither the lone jessie install, or the 
> > only stretch install actually have files in that directory. 
> 
> In which of the three, /{etc,run,usr/lib}/tmpfiles.d ? According to systemdese,
> the distribution files belong in /usr/lib/ (check the directory, I believe you
> won't find it empty), administrator adjustments in /etc (so no surprise a
> vanilla install doesn't have those) and /run, uhmm.. Ask a systemd disciple.
> 
> > If its there, why not make use of it?
> 
> Apparantly, it is being used.
> 
> > Neither jessie nor stretch have a manpage for systemd.tmpfiles.
> 
> Where'd you get that one from? tmpfiles.d(5) references systemd-tmpfiles(8),
> which follows the typical systemd naming scheme of systemd-xxx for systemd
> specific service applications. I suggest you report a docco bug for the
> referencing file mentioning systemd.tmpfiles instead of systemd-tmpfiles.
> 
> > There is a manpage for systemd-tmpfiles, and apparently some of its 
> > callable subroutines.
> 
> You're not exactly supposed to call systemd-tmpfiles yourself.
> systemd-tmpfiles(8) documents the systemd services that call systemd-tmpfiles(8).
> During configuration development, it might be helpful for the administrator to
> manually verify their configuration though, so let's rejoice this manpage exists.

I don't believe that's true. For example, with stretch, Debian no
longer sets up xconsole. The instructions in /usr/share/doc/rsyslog/README.Debian
show how to do this using the files provided under /usr/share/doc/rsyslog/examples.
During that, one types
# systemd-tmpfiles --create xconsole.conf
BTW, xconsole is one that goes in /dev.

> > I've read that manual, 
> 
> systemd-tmpfiles(8) ? You're reading the wrong manual. Return to tmpfiles.d(5).
> 
> > (...) but with all the options, (...)
> 
> Some problems are inherently complex, and lead to verbose solutions, simply
> because of the necessary configurability. "Of course" a shell script would
> be "simpler", but then again you'd need different calls to binaries, touch,
> chown, mkdir, mknod, cp, etc. If you can't be bothered to figure out the
> character you need to create the type of filesystem entry you require, how
> can you argue that you could be bothered to look up mknod vs. mkdir, touch
> or chmod?

And who tidies up after themselves? Bearing in mind that /var/tmp is
non-volatile, this scheme does do a good job of keeping it clean
(unless there's a crash).

Cheers,
David.