On Fri, May 06, 2016 at 04:35:47AM -0600, Duncan Patton a Campbell wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > > Back when the script tag was removed from dhclient.conf the > functionality to do external commands was ostensibly moved > into hostname.if via the > > !command mechanism. > > in man hostname.if it says > > "It is worth noting that ``\$if'' in a command > line will be replaced by the interface name" > > Is there any similar tag to access the addess assigned by dhcp? > What other mechanisms exist to update dynamic dns assignments?
You could write a script around "route monitor" (in a while loop) to get notified when you get a new address assigned to the interface. Another possibility is to use dhclient with option -L in combiantion with a tool like entr (in ports) to react on file changes. Remi