fix problem that tags don't show up in overlay

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2024-11-13 13:42:57 +01:00
committed by Jonathon Anderson
parent f2831b8de6
commit 68f62ed0a1
2 changed files with 5 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) {
var stage_file string
// TODO: when module version is upgraded to go1.18, should be 'any' type
var tmpl_data interface{}
var tmpl_data *templateVars
remoteNode, err := GetNodeOrSetDiscoverable(rinfo.hwaddr)
if err != nil && err != node.ErrNoUnconfigured {
@@ -91,13 +91,13 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) {
wwlog.Error("%s (unknown/unconfigured node)", rinfo.hwaddr)
if rinfo.stage == "ipxe" {
stage_file = path.Join(conf.Paths.Sysconfdir, "/warewulf/ipxe/unconfigured.ipxe")
tmpl_data = templateVars{
tmpl_data = &templateVars{
Hwaddr: rinfo.hwaddr}
}
} else if rinfo.stage == "ipxe" {
stage_file = path.Join(conf.Paths.Sysconfdir, "warewulf/ipxe/"+remoteNode.Ipxe+".ipxe")
tmpl_data = templateVars{
tmpl_data = &templateVars{
Id: remoteNode.Id(),
Cluster: remoteNode.ClusterName,
Fqdn: remoteNode.Id(),
@@ -181,7 +181,7 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) {
}
case "grub.cfg":
stage_file = path.Join(conf.Paths.Sysconfdir, "warewulf/grub/grub.cfg.ww")
tmpl_data = templateVars{
tmpl_data = &templateVars{
Id: remoteNode.Id(),
Cluster: remoteNode.ClusterName,
Fqdn: remoteNode.Id(),