Replace hostname -f with uname -n

This commit is contained in:
Kenjiro Nakayama
2015-04-07 01:22:06 +09:00
committed by Dawn Chen
parent 996ded35ff
commit 2e702b0c61
8 changed files with 8 additions and 14 deletions

View File

@@ -28,7 +28,7 @@ func GetHostname(hostnameOverride string) string {
if string(hostname) == "" {
// Note: We use exec here instead of os.Hostname() because we
// want the FQDN, and this is the easiest way to get it.
fqdn, err := exec.Command("hostname", "-f").Output()
fqdn, err := exec.Command("uname", "-n").Output()
if err != nil {
glog.Fatalf("Couldn't determine hostname: %v", err)
}