hostname usage is buggy

and removing ubuntu specific code.