support both hostname and fqdn as local hostname
Merge branch 'master' into portable