support both hostname and fqdn as local hostname