Re: How to run script on network address change?

From: Rozhuk Ivan <>
Date: Sun, 20 Jun 2021 16:37:44 UTC
On Sun, 20 Jun 2021 16:23:38 +0200
"dmilith ." <> wrote:

> Have you tried `route monitor`?
No, and I do not want keep running some daemon that will parse output.

But thanks, I found good place to add devctl_notify() calls.
Now devd have new events.

ifconfig lan0 alias
ifconfig lan0 -alias
ifconfig lan0 inet6 1111::

devd output:
!system=IFNET subsystem=lan0 type=ADDR_ADD
!system=IFNET subsystem=lan0 type=ADDR_DEL
!system=IFNET subsystem=lan0 type=ADDR_ADD 1111::

And even for netif rename:
ifconfig lan0 name lan1
ifconfig lan1 name lan0

devd output:
!system=IFNET subsystem=lan0 type=RENAME lan1
!system=IFNET subsystem=lan1 type=RENAME lan0