Do the hostname thing properly.