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
commit15d9f9769360b1cb8c748de8ee995030ade5eb35 (patch)
tree97f7c9057c284fbb8f9e0428533f2d7b4da85772 /linuxstatus/hostname.go
parent983517732d9f193771665d8191c58e47028c6670 (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() {