Fix for faulty boolean logic (ref #292)

This commit is contained in:
Gregory Kurtzer
2022-02-12 01:53:18 +00:00
parent 0cdc8d1492
commit b1b893861e
2 changed files with 4 additions and 7 deletions

View File

@@ -88,7 +88,6 @@ func (config *nodeYaml) FindAllNodes() ([]NodeInfo, error) {
n.RuntimeOverlay.Set(node.RuntimeOverlay)
n.Root.Set(node.Root)
n.AssetKey.Set(node.AssetKey)
n.Discoverable.Set(node.Discoverable)
for devname, netdev := range node.NetDevs {
@@ -150,7 +149,6 @@ func (config *nodeYaml) FindAllNodes() ([]NodeInfo, error) {
n.RuntimeOverlay.SetAlt(config.NodeProfiles[p].RuntimeOverlay, p)
n.Root.SetAlt(config.NodeProfiles[p].Root, p)
n.AssetKey.SetAlt(config.NodeProfiles[p].AssetKey, p)
n.Discoverable.SetAlt(config.NodeProfiles[p].Discoverable, p)
for devname, netdev := range config.NodeProfiles[p].NetDevs {
@@ -232,7 +230,6 @@ func (config *nodeYaml) FindAllProfiles() ([]NodeInfo, error) {
p.SystemOverlay.Set(profile.SystemOverlay)
p.Root.Set(profile.Root)
p.AssetKey.Set(profile.AssetKey)
p.Discoverable.Set(profile.Discoverable)
for devname, netdev := range profile.NetDevs {

View File

@@ -104,10 +104,10 @@ func (ent *Entry) Get() string {
}
func (ent *Entry) GetB() bool {
if ent.value == "false" || ent.value == "no" {
return false
}
if ent.altvalue == "false" || ent.altvalue == "no" || ent.altvalue == "" {
if ent.value == "false" || ent.value == "no" || ent.value == "" {
if ent.altvalue == "false" || ent.altvalue == "no" || ent.altvalue == "" {
return false
}
return false
}
return true