files: default mode
This commit is contained in:
parent
3f2cd997a0
commit
1555419549
@ -147,7 +147,12 @@ func applyConfig(cfgPath string, bootMounted bool) (cfg *configV1) {
|
|||||||
log.Printf("failed to create dir %s: %v", filepath.Dir(fileDef.Path), err)
|
log.Printf("failed to create dir %s: %v", filepath.Dir(fileDef.Path), err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = os.WriteFile(filePath, []byte(fileDef.Content), fileDef.Mode)
|
mode := fileDef.Mode
|
||||||
|
if mode == 0 {
|
||||||
|
mode = 0644
|
||||||
|
}
|
||||||
|
|
||||||
|
err = os.WriteFile(filePath, []byte(fileDef.Content), mode)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fatalf("failed to write %s: %v", fileDef.Path, err)
|
fatalf("failed to write %s: %v", fileDef.Path, err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user