From d2550caa1711c6f5f7168484396115db9735273b Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 6 Sep 2024 13:07:56 -0400 Subject: [PATCH] ignition/bootstrap/common: account for templated files when setting mode The if chain just after this expects the final filename and not the possibly templated version. Strip the suffix in case it's a templated file. This notably fixes the mode for `registries.conf`, which became a templated file and so went from 0644 to 0600. This patch brings it back to 0644. --- pkg/asset/ignition/bootstrap/common.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/asset/ignition/bootstrap/common.go b/pkg/asset/ignition/bootstrap/common.go index 7c084480db4..0638d2b246d 100644 --- a/pkg/asset/ignition/bootstrap/common.go +++ b/pkg/asset/ignition/bootstrap/common.go @@ -423,6 +423,7 @@ func AddStorageFiles(config *igntypes.Config, base string, uri string, templateD } filename := path.Base(uri) + filename = strings.TrimSuffix(filename, ".template") parentDir := path.Base(path.Dir(uri)) var mode int