@@ -316,14 +316,14 @@ func (a *Ignition) Generate(ctx context.Context, dependencies asset.Parents) err
316316
317317 // add ZTP manifests to manifestPath
318318 for _ , file := range agentManifests .FileList {
319- manifestFile := ignition .FileFromBytes (filepath .Join (manifestPath , filepath .Base (file .Filename )),
319+ manifestFile := ignition .FileFromBytes (path .Join (manifestPath , filepath .Base (file .Filename )),
320320 "root" , 0600 , file .Data )
321321 config .Storage .Files = append (config .Storage .Files , manifestFile )
322322 }
323323
324324 // add AgentConfig if provided
325325 if agentConfigAsset .Config != nil {
326- agentConfigFile := ignition .FileFromBytes (filepath .Join (manifestPath , filepath .Base (agentConfigAsset .File .Filename )),
326+ agentConfigFile := ignition .FileFromBytes (path .Join (manifestPath , filepath .Base (agentConfigAsset .File .Filename )),
327327 "root" , 0600 , agentConfigAsset .File .Data )
328328 config .Storage .Files = append (config .Storage .Files , agentConfigFile )
329329 }
@@ -588,7 +588,7 @@ func addMacAddressToHostnameMappings(
588588 }
589589 for _ , host := range agentHostsAsset .Hosts {
590590 if host .Hostname != "" {
591- file := ignition .FileFromBytes (filepath .Join (hostnamesPath ,
591+ file := ignition .FileFromBytes (path .Join (hostnamesPath ,
592592 strings .ToLower (filepath .Base (host .Interfaces [0 ].MacAddress ))),
593593 "root" , 0600 , []byte (host .Hostname ))
594594 config .Storage .Files = append (config .Storage .Files , file )
@@ -602,8 +602,8 @@ func addHostConfig(config *igntypes.Config, agentHosts *agentconfig.AgentHosts)
602602 return err
603603 }
604604
605- for path , content := range confs {
606- hostConfigFile := ignition .FileFromBytes (filepath .Join ("/etc/assisted/hostconfig" , path ), "root" , 0644 , content )
605+ for pathName , content := range confs {
606+ hostConfigFile := ignition .FileFromBytes (path .Join ("/etc/assisted/hostconfig" , pathName ), "root" , 0644 , content )
607607 config .Storage .Files = append (config .Storage .Files , hostConfigFile )
608608 }
609609 return nil
0 commit comments