Comment 14 for bug 90388

Revision history for this message
Gökdeniz Karadağ (gokdeniz) wrote :

Another approach might be to set "/etc/hostname" to the value from DHCP server, and leave the current hostname alone. That would set the host name to correct value at next boot, without any clash with netowork manager behaviour or a running X [ and hopefully the name would not change between reboots :) ]

As 9.10 enables parallel initscripts with upstart, having the network up before gdm(or kdm) can be hard, you may need to change ordering of initscripts, or it may be undesirable (startup "seems" slower). I cannot comment exactly about the situation as we are still at 8.04 LTS.

simply change the line
hostname $new_host_name;
TO
if [[ -n $new_host_name ]]; then echo "$new_host_name" > /etc/hostname ; fi