mirror of
https://github.com/rancher/os.git
synced 2025-07-14 23:39:03 +00:00
Merge pull request #2304 from Jason-ZW/fix-cloudinitexecute-decoding-bug
Add decode logic for writefiles
This commit is contained in:
commit
9389687557
@ -10,6 +10,7 @@ import (
|
||||
"strings"
|
||||
|
||||
rancherConfig "github.com/rancher/os/config"
|
||||
"github.com/rancher/os/config/cloudinit/config"
|
||||
"github.com/rancher/os/config/cloudinit/system"
|
||||
"github.com/rancher/os/docker"
|
||||
"github.com/rancher/os/log"
|
||||
@ -124,6 +125,14 @@ func WriteFiles(cfg *rancherConfig.CloudConfig, container string) {
|
||||
continue
|
||||
}
|
||||
|
||||
content, err := config.DecodeContent(file.File.Content, file.File.Encoding)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
file.File.Content = string(content)
|
||||
file.File.Encoding = ""
|
||||
|
||||
f := system.File{
|
||||
File: file.File,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user