Bug 135495

Summary: Diskless client hostname incorrectly set: ends with a dot
Product: Red Hat Enterprise Linux 3 Reporter: Graham Leggett <minfrin>
Component: redhat-config-netbootAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-20 14:34:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Graham Leggett 2004-10-13 01:59:57 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040925

Description of problem:
In the disklessrc script, some text cutting magic is used to extract
the hostname from the IP address of the machine, as reported using the
"host" command.

The problem is that the result of the cutting process produces a
hostname terminated with a dot, instead of just a hostname, like so:

hostname.example.com.
                    ^--- extra dot

This causes problems with Gnome, which complains that the hostname of
the machine is not found.


Version-Release number of selected component (if applicable):
system-config-netboot-0.1.7-1

How reproducible:
Always

Steps to Reproduce:
xxx

Additional info:

Comment 1 Daniel Walsh 2004-10-19 15:27:50 UTC
I am not seeing this here.  Could you give me an example of the IP
address that this happens with.  IE 

> host 209.132.177.50  |  sed 's/.* \(.*\)./\1/'
www.redhat.com


Comment 2 Graham Leggett 2004-10-19 16:19:47 UTC
When you run "host" manually, it does this:

[root@gatekeeper root]# host 192.168.200.200
200.200.168.192.in-addr.arpa domain name pointer violet.fma.co.za.

It seems text chopping magic leaves the dot on the end of the sentence
intact.

The host app version is as follows:

[root@gatekeeper root]# which host
/usr/bin/host
[root@gatekeeper root]# rpm -q -f /usr/bin/host
bind-utils-9.2.4-EL3_10

In my version of "disklessrc" the hostname is extracted in the
following line:

hostname `host $IP | cut -f 5 -d ' '`

Is this from an older version of netboot, perhaps?


Comment 3 Daniel Walsh 2004-10-19 17:23:03 UTC
Yup.

ftp://people.redhat.com/dwalsh/netboot has the latest.  Will be in U4

However this code is not in the greatest of shape.  :^(

Dan