summaryrefslogtreecommitdiff
path: root/linuxstatus
diff options
context:
space:
mode:
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() {