[systemd-devel] [PATCH] rules: only run systemd-sysctl when a network device is added
Kay Sievers
kay at vrfy.org
Sun Jun 16 10:42:03 PDT 2013
On Fri, Jun 14, 2013 at 3:39 PM, Ross Lagerwall <rosslagerwall at gmail.com> wrote:
> On Fri, Jun 14, 2013 at 02:44:23PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
>> On Thu, Jun 13, 2013 at 10:45:12AM +0100, Ross Lagerwall wrote:
>> > Otherwise, when a network device is renamed, systemd-sysctl is run twice
>> > with the same network device name: once for ACTION="add" and once for
>> > ACTION="move".
>>
>> Hm, but if I have some sysctl for the network device,
>> /proc/sys/net/ipv4/conf/enp0s1f3/log_martians=11 or something, aren't
>> I going to have it under the *new* name, not the old name?
>
> 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.
Kay
More information about the systemd-devel
mailing list