Opened 19 years ago

Closed 19 years ago

Last modified 14 years ago

#320 closed defect (fixed)

Get rid of bad entry in /etc/hosts with dhcp client

Reported by: DJ Lucas Owned by: blfs-book@…
Priority: normal Milestone:
Component: BOOK Version: ~CVS
Severity: normal Keywords: VERIFIED
Cc:

Description

/etc/hosts most likely has an incorrect IP address for the FQDN of the local machine. Suggest a script that updates /etc/hosts with corrected IP.

Attachments (6)

bootscripts.xml (3.9 KB ) - added by DJ Lucas 19 years ago.
rough suggestion (may be useable as is)
dhcp-hosts.patch (1.8 KB ) - added by DJ Lucas 19 years ago.
patch to BLFS/BOOK/connect/dhcp/bootscripts.xml
dhcp-hosts.2.patch (1.5 KB ) - added by DJ Lucas 19 years ago.
Uses output of 'ifconfig eth0' to correct the hosts file
dhcp-hosts-fix-2.patch (1.7 KB ) - added by DJ Lucas 19 years ago.
forgot to copy the original file and edit.
320.diff (1.5 KB ) - added by DJ Lucas 19 years ago.
see last entry
320.2.diff (1.1 KB ) - added by DJ Lucas 19 years ago.
Final patch that resolves bug

Download all attachments as: .zip

Change History (25)

by DJ Lucas, 19 years ago

Attachment: bootscripts.xml added

rough suggestion (may be useable as is)

by DJ Lucas, 19 years ago

Attachment: dhcp-hosts.patch added

patch to BLFS/BOOK/connect/dhcp/bootscripts.xml

comment:1 by DJ Lucas, 19 years ago

attachments.isobsolete: 01

comment:2 by DJ Lucas, 19 years ago

Milestone: futurepost-1.0
Priority: lowestnormal
Severity: enhancementnormal

by DJ Lucas, 19 years ago

Attachment: dhcp-hosts.2.patch added

Uses output of 'ifconfig eth0' to correct the hosts file

comment:3 by DJ Lucas, 19 years ago

attachments.isobsolete: 01

by DJ Lucas, 19 years ago

Attachment: dhcp-hosts-fix-2.patch added

forgot to copy the original file and edit.

comment:4 by DJ Lucas, 19 years ago

attachments.isobsolete: 01

comment:5 by bdubbs@…, 19 years ago

Is this bug really needed? The resolution of a DHCP address should be done by the ISP issuing the IP address through the DNS system. Anything else is a workaround. This probably should be a hint and not a candidate for the book.

comment:6 by larry@…, 19 years ago

Resolution: later
Status: newclosed

The problem need additional investigation. Is something else 'not right'? i.e. XFree looking to /etc/host for FQDN instead of gethostname() [be sure and laugh if gethostname() resolves through /etc/host].

comment:7 by tushar@…, 19 years ago

Milestone: post-1.06.0
Resolution: later
Status: closedreopened

5.0 is out, reopen all bugs.

comment:8 by tushar@…, 19 years ago

Owner: changed from blfs-book@… to tushar@…
Status: reopenednew

comment:9 by tushar@…, 19 years ago

Status: newassigned

comment:10 by DJ Lucas, 19 years ago

We need to take a quick look at this and see what's up (somebody who would know more than I). A quick recap. I discovered this 'issue' by mistyping my hostname in /etc/hosts. X must look at /etc/hosts for the hostname and/or ip address. I've not looked into this very deeply so I don't yet know if it really makes a difference. My simple testcase was mistyping the hostname and then do a startx and check the log. I haven't seen any problems with X getting the wrong IP address from that lookup. Being that we've been using it this way for a long time...It's probably not a real problem, but I thought it should be corrected anyways. I'll look into it furthur myself when I get to a point where I can kill all of these xterms...say maybe in like two weeks ;-)

-- DJ

comment:11 by DJ Lucas, 19 years ago

Other possible fix as discussed here: http://archive.linuxfromscratch.org/mail-archives/blfs-dev/2003-November/004562.html

Probably much better that the other. Actual commit pending discussion on blfs-dev.

by DJ Lucas, 19 years ago

Attachment: 320.diff added

see last entry

comment:12 by DJ Lucas, 19 years ago

attachments.isobsolete: 01

comment:13 by DJ Lucas, 19 years ago

Summary: Make ifup-eth0 in dhcp client correct /etc/hosts file.Get rid of bad entry in /etc/hosts with dhcp client

comment:14 by tushar@…, 19 years ago

Owner: changed from tushar@… to blfs-book@…
Status: assignednew

by DJ Lucas, 19 years ago

Attachment: 320.2.diff added

Final patch that resolves bug

comment:15 by DJ Lucas, 19 years ago

attachments.isobsolete: 01

comment:16 by tushar@…, 19 years ago

Status: newassigned

comment:17 by tushar@…, 19 years ago

Resolution: fixed
Status: assignedclosed

comment:18 by igor@…, 19 years ago

Keywords: VERIFIED added

comment:19 by (none), 14 years ago

Milestone: 6.0

Milestone 6.0 deleted

Note: See TracTickets for help on using tickets.