Origin of /var/run contents

classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Origin of /var/run contents

Sven Hartge-5
Mart van de Wege <[hidden email]> wrote:

> Eh. It's in the docs. /run is for runtime generated, ephemeral units
> and other files.

> What stumped me at first is that /etc has priority over /run

This is because /etc is designed to override (or amend) anything from
the system, either static from (/usr)/lib/systemd or generated from /run.

Grüße,
Sven.

--
Sigmentation fault. Core dumped.

Reply | Threaded
Open this post in threaded view
|

Re: Origin of /var/run contents

Mart van de Wege
Sven Hartge <[hidden email]> writes:

> Mart van de Wege <[hidden email]> wrote:
>
>> Eh. It's in the docs. /run is for runtime generated, ephemeral units
>> and other files.
>
>> What stumped me at first is that /etc has priority over /run
>
> This is because /etc is designed to override (or amend) anything from
> the system, either static from (/usr)/lib/systemd or generated from /run.
>
I realise that *now*. Originally I likened the systemd config to the
usual defaults compiled in, then sysadmin overrides in /etc/, then user
overrides in ~/

That was the wrong mental model, as it turned out.

Mart

--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.

Reply | Threaded
Open this post in threaded view
|

Re: Origin of /var/run contents

Jonathan de Boyne Pollard
In reply to this post by Dave Sherohman-3
Dave Sherohman:

> Or should I be going about this in a completely different manner?
>

Yes.

> [Service]
> Type=simple
> User=starman
> RuntimeDirectory=starman
>
And simply do not use the --pid and --daemonize options in the first
place.  You are using a service manager that tracks child processes and
that runs things in dæmon context to begin with. Employing the rickety
and dangerous PID file mechanism and vain attempts at self-dæmonization
is quite wrong.

*
http://jdebp.eu./FGA/unix-daemon-design-mistakes-to-avoid.html#DoNotCreatePIDFiles

*
http://jdebp.eu./FGA/unix-daemon-design-mistakes-to-avoid.html#DoNotBackgroundise


Reply | Threaded
Open this post in threaded view
|

Origin of /var/run contents

Jonathan de Boyne Pollard
In reply to this post by Gene Heskett-4
Reply | Threaded
Open this post in threaded view
|

Re: Origin of /var/run contents

Gene Heskett-4
On Saturday 03 March 2018 11:14:34 Jonathan de Boyne Pollard wrote:

> Gene Heskett:
> > Didn't anyone think of the stuff that runs as a user?
>
> They did.  They gave you a /run/user/$UID directory owned by you, and
> an XDG_RUNTIME_DIR environment variable whose value points to it that
> you use so that its location is configurable.  They also gave you a
> manual entry.
>
> *
> https://freedesktop.org/software/systemd/man/file-hierarchy.html#Runti
>me%20Data
>
> *
> https://manpages.debian.org/wheezy/systemd/file-hierarchy.7.en.html#RU
>NTIME_DATA
>
> * https://unix.stackexchange.com/questions/162900/
>
> * http://jdebp.eu./Softwares/nosh/guide/gazetteer.html#user-runtime
>
> * http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s15.html
>
> * https://wiki.debian.org/ReleaseGoals/RunDirectory
>
> * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=635131
>
> *
> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux
>/7/html/migration_planning_guide/sect-red_hat_enterprise_linux-migratio
>n_planning_guide-file_system_layout#sect-Red_Hat_Enterprise_Linux-Migra
>tion_Planning_Guide-File_System_Layout-Changes_to_the_run_directory

I don't believe it was documented, or even existed at the time I moved my
stuff. This machine, and 3 others here, running linuxcnc, are still
wheezy. One experimental install on a pi is running jessie. And I've not
had that problem with jessie. So its possible we could both be right.
One stretch install on an arm64, not doing anything of note except
building rt kernels is also working well.


--
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

Reply | Threaded
Open this post in threaded view
|

Re: Origin of /var/run contents

Greg Wooledge
On Sat, Mar 03, 2018 at 12:09:54PM -0500, Gene Heskett wrote:
> On Saturday 03 March 2018 11:14:34 Jonathan de Boyne Pollard wrote:
> > Gene Heskett:
> > > Didn't anyone think of the stuff that runs as a user?
> >
> > They did.  They gave you a /run/user/$UID directory owned by you, and
> > an XDG_RUNTIME_DIR environment variable whose value points to it that
> > you use so that its location is configurable.  They also gave you a
> > manual entry.
(snip)

> I don't believe it was documented, or even existed at the time I moved my
> stuff. This machine, and 3 others here, running linuxcnc, are still
> wheezy. One experimental install on a pi is running jessie.

All of the stuff Jonathan is describing is from systemd, which basically
means jessie and later.

Wheezy used sysvinit and related pacakges, not systemd.

Jessie does have the file-hierarchy(7) man page that Jonathan mentioned.
Note that the first sentence in this man page mentions systemd.

Reply | Threaded
Open this post in threaded view
|

Origin of /var/run contents

Jonathan de Boyne Pollard
Greg Wooledge:

> Wheezy used sysvinit and related pacakges, not systemd. Jessie does
> have the file-hierarchy(7) man page that Jonathan mentioned.
>
Debian 7 had systemd, and the sharp-eyed who read the URL will have
noticed that I pointed to the Debian 7 version of that manual page.

Have a manual page from Ubuntu 14, which likewise did in fact have
systemd, to go with it:

* http://manpages.ubuntu.com/manpages/trusty/man8/pam_systemd.8.html

This stuff does go back quite a number of years, now.

*
https://lists.freedesktop.org/archives/systemd-devel/2010-October/000686.html


Greg Wooledge:

> All of the stuff Jonathan is describing is from systemd,
>
The sharp-eyed will have also spotted that that is untrue.  At least one
of the things that I pointed to most definitely is not systemd.

Reply | Threaded
Open this post in threaded view
|

Re: Origin of /var/run contents

deloptes-2
Jonathan de Boyne Pollard wrote:

>> Wheezy used sysvinit and related pacakges, not systemd. Jessie does
>> have the file-hierarchy(7) man page that Jonathan mentioned.
>>
> Debian 7 had systemd, and the sharp-eyed who read the URL will have
> noticed that I pointed to the Debian 7 version of that manual page.

$ ls /usr/share/man/man
man1/ man2/ man3/ man4/ man5/ man6/ man7/ man8/

for the record those (1...8) are not the debian version

man man

DESCRIPTION
       man is the system's manual pager.  Each page argument given to man is
normally the name of a program, utility  or  function.   The  manual  page
       associated  with  each  of these arguments is then found and
displayed.  A section, if provided, will direct man to look only in that
section of
       the manual.  The default action is to search in all of the available
sections following a pre-defined order ("1 n l 8 3 2 3posix 3pm 3perl 3am 5
       4  9  6  7"  by default, unless overridden by the SECTION directive
in /etc/manpath.config), and to show only the first page found, even if
page
       exists in several sections.

       The table below shows the section numbers of the manual followed by
the types of pages they contain.

       1   Executable programs or shell commands
       2   System calls (functions provided by the kernel)
       3   Library calls (functions within program libraries)
       4   Special files (usually found in /dev)
       5   File formats and conventions eg /etc/passwd
       6   Games
       7   Miscellaneous (including macro packages and conventions), e.g.
man(7), groff(7)
       8   System administration commands (usually only for root)
       9   Kernel routines [Non standard]


regards

Reply | Threaded
Open this post in threaded view
|

Re: Origin of /var/run contents

Greg Wooledge
In reply to this post by Jonathan de Boyne Pollard
On Tue, Mar 06, 2018 at 11:26:19PM +0000, Jonathan de Boyne Pollard wrote:
> Greg Wooledge:
>
> > Wheezy used sysvinit and related pacakges, not systemd. Jessie does have
> > the file-hierarchy(7) man page that Jonathan mentioned.
> >
> Debian 7 had systemd, and the sharp-eyed who read the URL will have noticed
> that I pointed to the Debian 7 version of that manual page.

Not by default.

ebase@ebase-adm:~$ cat /etc/debian_version
7.11
ebase@ebase-adm:~$ man file-hierarchy
No manual entry for file-hierarchy

Optionally installable "technology preview" packages like wheezy's
unripe systemd do not count.

12