On all previous versions of Mandrake, from 7.0 to 8.1 when a machine was
given an IP from DHCP the hostname would be set correctly.
As of Mandrake 8.2, (and 9.0b1) when an IP is given over DHCP the
hostname will be "localhost". Even when it has a fully qualified domain
name.
This is very irritating. We kickstart workstations using DHCP then on
reboot run a series of scripts to configure the machines. (Basically a
post kickstart configuration). Most configureations (including a script
that changes the machine from a DHCP client to a static IP) break when
the hostname isn't set. We end up having to write ugle messing scripts
to find out hostname.
Example, On Mandrake 8.1 when using DHCP to get an IP:
[driver@mulan ~]$ hostname
mulan.jpl.nasa.gov
[driver@mulan ~]$
Machine using Mandrake 8.2 using DHCP to get an IP:
[driver@localhost ~]$ hostname
localhost.jpl.nasa.gov
[driver@localhost ~]$
Previously we'd need to do this for our scripts:
hostname=`hostname -a`
ip=`host $hostname | awk '{ print $4 }'`
Since Mandrake 8.2 things got messy:
ip=`ip addr show dev eth0 | grep inet | awk '{print $2}' | sed "s/\/.*//"`
hostname=`host $ip | awk '{print $5}' | sed "s/\..*//"`
The side effect of having the machine think it's localhost also causes
problems when configureing various services.
I guess my gripe is... I don't like things to be so messy... ;)
--
Bryan Whitehead
SysAdmin - JPL - Interferometry Systems and Technology
Phone: 818 354 2903
[EMAIL PROTECTED]