1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 22:32:14 +00:00

Implement bootcmd

This commit is contained in:
Josh Curl
2016-11-03 15:06:20 -07:00
parent 33b6145162
commit bb4ad618e1
6 changed files with 34 additions and 14 deletions

View File

@@ -94,18 +94,7 @@ func ApplyConsole(cfg *rancherConfig.CloudConfig) {
}
}
for _, runcmd := range cfg.Runcmd {
if len(runcmd) == 0 {
continue
}
cmd := exec.Command(runcmd[0], runcmd[1:]...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
log.Errorf("Failed to run %s: %v", runcmd, err)
}
}
util.RunCommandSequence(cfg.Runcmd)
}
func WriteFiles(cfg *rancherConfig.CloudConfig, container string) {