From a385734bc948b6cae6c5dd9a5fc48abaca4a040f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 6 Jan 2024 16:59:33 -0600 Subject: all engines running and stable Signed-off-by: Jeff Carr --- linuxstatus/hostname.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'linuxstatus/hostname.go') 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() { -- cgit v1.2.3