On Tue, 2013-03-19 at 12:21 -0400, Pavel Simerda wrote:
- Original Message -
From: Christoph Mathys erase...@gmail.com
I apologize if this is the wrong place to ask.
No probem at all.
Short: Does NM run dispatcher.d scripts if dhclient renews an IP? (NM
0.9.4)
From NM point of view, there's no reason to do that, it's not a
connection/connectivity change.
That said, it *could* be IP address changes, route changes, DNS changes,
anything really, because the DHCP server can change any of these options
during the lease and we'll get them at renew.
NM does emit the 'dhcp4-change' and 'dhcp6-change' events to dispatcher
scripts on the dhclient BOUND, RENEW, REBOOT, and REBIND events.
Our dns deletes dynamic entries if they have not been updated for 20
days or so.
So your DNS is updated by the client, not by the server. You could use cron
for that, possibly. I don't think you can run specific scripts from dhclient
when it's run with NetworkManager's action binary instead of dhclient-script,
but let's wait for other responses. Therefore it looks like you want to get
back the DHCP-based scripting capabilities with NetworkManager. It would be
possible to modify the NM dhclient module.
Typically that's what dispatcher scripts are for; if we need more events
for dispatcher scripts then we should investigate adding them.
Currently there's up, down, dhcp4-change, dhcp6-change, and hostname.
See 'man NetworkManager' for more information.
But we do need ones for IPv6 addressing changes that are *not* dependent
on DHCPv6, because the IP configuration can change via RA when DHCP
isn't involved.
In reality, the DHCP change events are more for notifying scripts of all
the DHCP options that NM doesn't care about, but that scripts should
care about, like NTP servers, SIP servers, etc.
Dan
We create and maintain this entries using a dispatcher
script in NM. This works fine for normal clients that are shutdown at
the end of the day/week. If the client runs for several weeks, it
regularly renews its dhcp lease (5 days), which I see in the
corresponding *.lease-file from dhclient. But I don't see any
activity concerning NM or our dispatcher script in the logs.
After the 20 days
have passed, the dns entry of the client just vanishes and I need to
manually disconnect and reconnect to retrigger the dispatcher script.
If it's 20 days, a cronjob checking for NM connection and acting upon it
might be easier.
Cheers,
Pavel
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list