I'm not crazy about the suggestion to use /etc/dhcp/.cache, it's like trying to access a private member variable of a class that you really shouldn't be in.

What is the 'acceptable' way with dhcp is to use the scripting that is supported inherently. Just by adding a 'script' block to your dhcp config file, you get access not only to the new ip address, but the wealth of information that comes back via dhcp (i.e. the old ip address when changing, routing info, dns info, etc.). The sample script provided (in /etc/dhcp) shows how you can get access to these values.

So the OP's cleanest option is to use this script to output the new IP address into a file if that's where he needs it to go.

--
[email protected] mailing list

Reply via email to