chiark / gitweb /
rules: only run systemd-sysctl when a network device is added
authorRoss Lagerwall <rosslagerwall@gmail.com>
Thu, 13 Jun 2013 09:45:12 +0000 (10:45 +0100)
committerKay Sievers <kay@vrfy.org>
Mon, 17 Jun 2013 19:17:59 +0000 (21:17 +0200)
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".

rules/99-systemd.rules.in

index d17bdd9..e9b2da7 100644 (file)
@@ -49,7 +49,7 @@ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:
 
 # Apply sysctl variables to network devices (and only to those) as they appear.
 
-SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name"
+ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name"
 
 # Asynchronously mount file systems implemented by these modules as
 # soon as they are loaded.