summaryrefslogtreecommitdiff
path: root/linuxstatus/hostname.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-06 16:59:33 -0600
committerJeff Carr <[email protected]>2024-01-06 16:59:33 -0600
commita385734bc948b6cae6c5dd9a5fc48abaca4a040f (patch)
tree00eac4714c36543d68eb32ce5d41f570af7e5501 /linuxstatus/hostname.go
parentbd3e75e68779b36186fb85a61b726b71a178e96f (diff)
all engines running and stable
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'linuxstatus/hostname.go')
-rw-r--r--linuxstatus/hostname.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/linuxstatus/hostname.go b/linuxstatus/hostname.go
index 58f84b2..e9ac5f4 100644
--- a/linuxstatus/hostname.go
+++ b/linuxstatus/hostname.go
@@ -31,6 +31,14 @@ func (ls *LinuxStatus) GetHostname() string {
return me.hostname.Get()
}
+func (ls *LinuxStatus) ValidHostname() bool {
+ if ! me.Ready() {return false}
+ if me.hostnameStatus.Get() == "VALID" {
+ return true
+ }
+ return false
+}
+
func (ls *LinuxStatus) setHostname(newname string) {
if ! me.Ready() {return}
if newname == me.hostname.Get() {