summaryrefslogtreecommitdiff
path: root/linuxstatus
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
parent983517732d9f193771665d8191c58e47028c6670 (diff)
all engines running and stable
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'linuxstatus')
-rw-r--r--linuxstatus/draw.go2
-rw-r--r--linuxstatus/hostname.go8
2 files changed, 9 insertions, 1 deletions
diff --git a/linuxstatus/draw.go b/linuxstatus/draw.go
index 91e0a6a..5b76b49 100644
--- a/linuxstatus/draw.go
+++ b/linuxstatus/draw.go
@@ -9,7 +9,7 @@ import (
// it's assumed you are always passing in a box
func draw(ls *LinuxStatus) {
if ! ls.Ready() {return}
- ls.group = ls.window.Box().NewGroup("What Linux Says It Is")
+ ls.group = ls.window.Box().NewGroup("What Linux Knows It Is")
ls.grid = ls.group.NewGrid("gridnuts", 2, 2)
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() {