Click to See Complete Forum and Search --> : RH 8.0 DHCP client info... what file?
nipperdj
12-27-2002, 11:41 PM
Apparantly RH 8.0 has changed the file names and locations for where DHCP client info is stored as there is no /etc/dhcp* directory nor any hostinfo-ethx. I need to get the assigned IP address progrmatically (not by ifconfig). Thanks in advance.
Dennis
slickquickyb
12-28-2002, 12:07 AM
i believe what you are looking for is in this folder under the heading dhcpd. I was just looking around and i noticed this :) Hope it helps
nipperdj
12-28-2002, 12:12 AM
dhcpd is the service daemon for the DHCP server. Thanks for the input though
nipperdj
12-28-2002, 03:27 AM
I can now answer my own question:
The assigned ip adress is in the following file:
/var/lib/dhcp/dhclient-eth0.leases
(could be ....-ethn.leases where n is 0-9)
The most recent lease is at the end of the file.. now can someone give me a quick bash script to grab it using a regular expression?