[systemd-devel] [PATCH 1/1] Ensure that /run/systemd/network exists

Lennart Poettering lennart at poettering.net
Wed May 27 06:01:31 PDT 2015


On Wed, 27.05.15 14:34, Martin Pitt (martin.pitt at ubuntu.com) wrote:

> Hey Peter,
> 
> Peter Lemenkov [2015-05-27 15:30 +0300]:
> > This directory is used for storing transient/generated network service
> > files. Unfortunately it doesn't generated during systemd-networkd
> > startup. Let's fix that.
> > ---
> >  src/network/networkd.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/src/network/networkd.c b/src/network/networkd.c
> > index 543a4e4..a98855f 100644
> > --- a/src/network/networkd.c
> > +++ b/src/network/networkd.c
> > @@ -67,6 +67,9 @@ int main(int argc, char *argv[]) {
> >          if (r < 0)
> >                  log_warning_errno(r, "Could not create runtime directory 'lldp': %m");
> >  
> > +        /* Create a directory for the generated transient network services */
> > +        mkdir_p("/run/systemd/network", 0755);
> 
> Should that perhaps go into /usr/lib/tmpfiles.d/systemd.conf instead,
> together with the related
> 
>   d /run/systemd/netif 0755 systemd-network systemd-network -
>   d /run/systemd/netif/links 0755 systemd-network systemd-network -
>   d /run/systemd/netif/leases 0755 systemd-network systemd-network -
> 
> ?

This would not suffice, as networkd can run in early-boot, but
tmpfiles only runs after /var and friends have been mounted.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list