1
0
mirror of https://github.com/rancher/os.git synced 2025-09-02 07:15:41 +00:00

My first pass at fixing the b2d autoformat

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-01-20 17:02:48 +10:00
parent 1c5d41a56e
commit a4e77692c4
6 changed files with 33 additions and 5 deletions

View File

@@ -267,7 +267,17 @@ func RunInit() error {
}
}
return cfg, nil
// save here so the bootstrap service can see it (when booting from iso, its very early)
if boot2DockerEnvironment {
if err := config.Set("rancher.state.dev", cfg.Rancher.State.Dev); err != nil {
log.Errorf("Failed to update rancher.state.dev: %v", err)
}
if err := config.Set("rancher.state.autoformat", cfg.Rancher.State.Autoformat); err != nil {
log.Errorf("Failed to update rancher.state.autoformat: %v", err)
}
}
return config.LoadConfig(), nil
},
func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
var err error
@@ -278,9 +288,6 @@ func RunInit() error {
return cfg, nil
},
func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
if err := os.MkdirAll(config.CloudConfigDir, os.ModeDir|0755); err != nil {
log.Error(err)
}
cfg.Rancher.CloudInit.Datasources = config.LoadConfigWithPrefix(state).Rancher.CloudInit.Datasources
if err := config.Set("rancher.cloud_init.datasources", cfg.Rancher.CloudInit.Datasources); err != nil {