Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Oct 2013
Get DHCP client info using the dhclient-exit-hook
i use a dhclient in my embedded system. and i need to get the dhcp info such as the leased ip-address, the default GW, the server ip and other dhcp options (expiry time etc..)
i know that i can extract these info from the dhclient.leases file - but this is a log file, and every new lease is appended to the end of the dhclient.leases file, and i prefer to get all this info using the dhclient-exit-hook.
i want to invoke a program (that i will write) to run automaticaly from this hook and that program will get these info as input.
can someone help how to write the dhclient-exit-hook script to do this job?
Thanks and regards,