gethostname by parsing /etc/hosts