(none) as hostname is bad to have …

I am not sure how Debian team will treat bug 650822 but I found it annoying.

If you by accident hit tab and leave an space in hostname line on Debian ( and Ubuntu ) in /etc/hostname,then after next reboot hostname will be set to (none).

I proposed potential patch/workaround for it,edit /etc/init.d/hostname.conf and in do_start() function change line

[ -f /etc/hostname ] && HOSTNAME=”$(cat /etc/hostname)”


[ -f /etc/hostname ] && HOSTNAME=”$(cat /etc/hostname | sed ‘s/^[ \t]*//;s/[ \t]*$//’)”

which will lead that space in /etc/hostname is ignored if present at end of line and set up correct hostname