mirror of
https://github.com/rancher/os.git
synced 2025-08-13 20:36:36 +00:00
Fix the missing of CloudConfigScriptFile
This commit is contained in:
parent
f2b09794e4
commit
b6629d44fb
@ -362,6 +362,7 @@ func RunInit() error {
|
|||||||
config.CfgFuncData{"read cfg and log files", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
|
config.CfgFuncData{"read cfg and log files", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
|
||||||
filesToCopy := []string{
|
filesToCopy := []string{
|
||||||
config.CloudConfigInitFile,
|
config.CloudConfigInitFile,
|
||||||
|
config.CloudConfigScriptFile,
|
||||||
config.CloudConfigBootFile,
|
config.CloudConfigBootFile,
|
||||||
config.CloudConfigNetworkFile,
|
config.CloudConfigNetworkFile,
|
||||||
config.MetaDataFile,
|
config.MetaDataFile,
|
||||||
@ -418,8 +419,12 @@ func RunInit() error {
|
|||||||
if strings.HasPrefix(name, "/var/lib/rancher/conf/") {
|
if strings.HasPrefix(name, "/var/lib/rancher/conf/") {
|
||||||
// only make the conf files harder to get to
|
// only make the conf files harder to get to
|
||||||
dirMode = os.ModeDir | 0700
|
dirMode = os.ModeDir | 0700
|
||||||
|
if name == config.CloudConfigScriptFile {
|
||||||
|
fileMode = os.FileMode(0755)
|
||||||
|
} else {
|
||||||
fileMode = os.FileMode(0400)
|
fileMode = os.FileMode(0400)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if err := os.MkdirAll(filepath.Dir(name), dirMode); err != nil {
|
if err := os.MkdirAll(filepath.Dir(name), dirMode); err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user