On Sun, 2021-06-20 at 16:52 +0300, Rozhuk Ivan wrote: > Hi! > > > I have FreeBSD 13@amd64 router with DHCP client on uplink. > > How to run script on IP address change? > > > I do not see events from devd, only: > !system=IFNET subsystem=em3 type=LINK_DOWN > !system=IFNET subsystem=em3 type=LINK_UP > >
You could use /etc/dhclient-exit-hooks script to take action after an IP address is bound. See the manpage for dhclient-script for more info. -- Ian