A hook script in "/etc/dhcp3/dhclient-exit-hooks.d/" should be able to fix this.
As has been mentioned, X might get angry, but you could always check for a running X before changing the hostname (assuming it's better to have the wrong hostname than it is to have a non-working X). Signaling a "no network" error to users could be done with /etc/motd, /etc/issue and/or xmessage A slight improvement on the interface guessing might be chasing up the default gateway: host $(ifconfig `ip route | awk '/^default/{print $5}'` | sed -rne 's/.*inet addr:(.*)Bcast.*/\1/p') | cut --delim \ --field 5 -- hostname supplied by dhcp server is not used https://bugs.launchpad.net/bugs/90388 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs