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,