summaryrefslogtreecommitdiff
path: root/hostname.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-31 12:41:28 -0600
committerJeff Carr <[email protected]>2024-01-31 12:41:28 -0600
commit1a9b13dda5e13d0786718768443bab4a6916aab9 (patch)
treeae05054e4889c2b1b7153b2992d80c4e856df20b /hostname.go
parent513c38922b1dca37bb2b2d64c5997e44b5796d00 (diff)
use SetText() not SetValue()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'hostname.go')
-rw-r--r--hostname.go11
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
}
}