Skip to content

Commit

Permalink
ignition/bootstrap/common: account for templated files when setting mode
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jlebon committed Sep 10, 2024
1 parent 3fa447a commit d2550ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/asset/ignition/bootstrap/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2550ca

Please sign in to comment.