[systemd-devel] [PATCH] rules: only run systemd-sysctl when a network device is added

Ross Lagerwall rosslagerwall at gmail.com
Sun Jun 16 14:58:31 PDT 2013


On Sun, Jun 16, 2013 at 07:42:03PM +0200, Kay Sievers wrote:
> > Yes.  Currently, systemd-sysctl is run twice when a network device is
> > added, *both* times with the new name as the prefix, like:
> > systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/enp0s1f3 ... (with the new name)
> >
> > Once is caused by the add action, the other is caused by the move
> > (rename) action.
> >
> > The patch causes it to only run the systemd-sysctl command once.
> >
> > Unless I'm misunderstanding what is happening?
> 
> The problem Zbigniew describes is that if one adds config options with
> predictable network names used, and we do not apply the stuff at
> "move", we will never apply them.
> 

OK, thanks.  But my testing shows otherwise: I created a .conf file with:
net.ipv4.conf.enp1s0.forwarding=1
(where eth0 is the old name, enp1s0 is the new, predictable name)
It *correctly* sets /proc/sys/net/ipv4/conf/enp1s0/forwarding=1 after
a reboot with the patch applied.

I'm still not clear about in which situations it could fail?
-- 
Ross Lagerwall


More information about the systemd-devel mailing list