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