Here's my NetworkManager integration script. It works for me: with this script installed as /etc/NetworkManager/dispatcher.d/whereami and executable, whereami now gets called whenever NM reconfigures an interface. Note a couple of issues:
* NM doesn't offer the same variety of operations and network state as dhclient-- we just get (post-)up or down, and the name of the interface.
* I'm not sure if I gave the right --hint values. Those could be adjusted.
Here's my NetworkManager integration script. It works for me: with this script installed as /etc/NetworkMan ager/dispatcher .d/whereami and executable, whereami now gets called whenever NM reconfigures an interface. Note a couple of issues:
* NM doesn't offer the same variety of operations and network state as dhclient-- we just get (post-)up or down, and the name of the interface.
* I'm not sure if I gave the right --hint values. Those could be adjusted.