> Charles, or anyone, help! > > I was trying to diagnose why the code that reloads the network in the > Dachstein dhclient_exit_hooks gets executed every time the lease > renews. I printed out the new and old ip address variables and the > reason variable, and waited for my setup to renew the lease. And > waitied for the lease to be renewed. > > Reason was BOUND, new_ip_address was 208.191.181.169 (this hasn't > changed since November last year), and old_ip_address was blank! > This certainly explains why the reload_all() routine in > dhclient_exit_hooks gets called so often! $old_ip_address never > equals $new_ip_address! > > I grepped for this variable everywhere and don't see where it is set. > Can you tell me where it is set, or should be set?
These variables should be setup by the dhclient program before the dhclient script is called. The available variables are documented by the dhclient-script man page: http://lrp.steinkuehler.net/Packages/man/dhclient-script.8.man.htm Note that BOUND is an initial binding to an IP, and does *NOT* have the $old_* variables set. RENEW is what should be sent as a reason when a lease is renewed, which should have both the $old_* and $new_* variables set... > It looks to me like this logic is not quite right and hasn't been for > quite a while. But it's very close to being right! There could be some errors...either in the enter/exit hooks files, or in the dhclient script file itself, which I modified to run in LEAF's limited environment. Reports on any fixes or errors spotted are more than welcome! I don't run the DHCP on any production machines, so I don't have much long-term first-hand experience with dhclient on LEAF...I just know it works on my test network without issue, but that's a single, fairly controlled environment... Charles Steinkuehler http://lrp.steinkuehler.net http://c0wz.steinkuehler.net (lrp.c0wz.com mirror) _______________________________________________ Leaf-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user
