diff options
Diffstat (limited to 'hostname.go')
| -rw-r--r-- | hostname.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hostname.go b/hostname.go index 2a2742c..bf4c4a7 100644 --- a/hostname.go +++ b/hostname.go @@ -26,7 +26,7 @@ func (ls *LinuxStatus) setDomainName() { dn := run("domainname") if me.domainname.String() != dn { log.Log(CHANGE, "domainname has changed from", me.GetDomainName(), "to", dn) - me.domainname.SetValue(dn) + me.domainname.SetText(dn) me.changed = true } } @@ -40,6 +40,7 @@ func (ls *LinuxStatus) GetHostname() string { func (ls *LinuxStatus) ValidHostname() bool { if !me.Ready() { + log.Info("ValidHostname() not ready") return false } if me.hostnameStatus.String() == "WORKING" { @@ -56,7 +57,7 @@ func (ls *LinuxStatus) setHostname(newname string) { return } log.Log(CHANGE, "hostname has changed from", me.GetHostname(), "to", newname) - me.hostname.SetValue(newname) + me.hostname.SetText(newname) me.changed = true } @@ -74,7 +75,7 @@ func (ls *LinuxStatus) setHostShort() { hshort := run("hostname -s") if me.hostshort.String() != hshort { log.Log(CHANGE, "hostname -s has changed from", me.hostshort.String(), "to", hshort) - me.hostshort.SetValue(hshort) + me.hostshort.SetText(hshort) me.changed = true } } @@ -118,12 +119,12 @@ func lookupHostname() { if me.hostnameStatus.String() != "BROKEN" { log.Log(CHANGE, "hostname", hostname, "does not equal", test) me.changed = true - me.hostnameStatus.SetValue("BROKEN") + me.hostnameStatus.SetText("BROKEN") } } else { if me.hostnameStatus.String() != "WORKING" { log.Log(CHANGE, "hostname", hostname, "is valid") - me.hostnameStatus.SetValue("WORKING") + me.hostnameStatus.SetText("WORKING") me.changed = true } } |
