NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: /var/run mechanics
On Fri, Aug 07, 2020 at 05:34:13AM +0300, Dima Veselov wrote:
>
> We had recent power outage and noticed a problem about
> /var/run - few daemons could not start because there
> were no directories in /var/run. Like there is
> /var/run/named and there is no /var/run/opendkim, so
> opendkim will not run and i have to create manually.
>
That is a problem with the start scripts then.
>
> I am not sure why /var/run have to be rebuilt upon every
> system start. If I am right - there is a problem of
> directories not created for yet non-available users.
>
Because it is intended to hold information that is only relevant to the currently
booted instance - things like the pids of daemons or named pipes or sockets that are
no use after a reboot.
> What could be done to avoid /var/run destruction or
> other way to avoid problems daemons.
>
> I can put something like "[[ ! -d /var/run/dir ]]
> && mkdir ..." in rc(8) prestart section but it seems
> to be ugly solution.
>
That is the correct thing to do if the information you want there is only relevant
to the currently booted system. If there is information that you need to persist
between boots it should be put elsewhere.
--
Brett Lymn
--
Sent from my NetBSD device.
"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",
"Oh"
Home |
Main Index |
Thread Index |
Old Index