mirror of
https://github.com/rancher/os.git
synced 2025-09-25 04:37:02 +00:00
Add an autologin that allows us to fix the stty
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
@@ -263,12 +263,12 @@ func RunInit() error {
|
||||
return cfg, nil
|
||||
}},
|
||||
config.CfgFuncData{"load modules", loadModules},
|
||||
config.CfgFuncData("recovery console", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
|
||||
config.CfgFuncData{"recovery console", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
|
||||
if cfg.Rancher.Recovery {
|
||||
recovery(nil)
|
||||
}
|
||||
return cfg, nil
|
||||
},
|
||||
}},
|
||||
config.CfgFuncData{"b2d env", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {
|
||||
if dev := util.ResolveDevice("LABEL=B2D_STATE"); dev != "" {
|
||||
boot2DockerEnvironment = true
|
||||
|
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/docker/libcompose/yaml"
|
||||
"github.com/rancher/os/compose"
|
||||
"github.com/rancher/os/config"
|
||||
"github.com/rancher/os/netconf"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -55,8 +56,8 @@ func recovery(initFailure error) {
|
||||
|
||||
var recoveryConfig config.CloudConfig
|
||||
recoveryConfig.Rancher.Defaults = config.Defaults{
|
||||
Network: config.NetworkConfig{
|
||||
DNS: config.DNSConfig{
|
||||
Network: netconf.NetworkConfig{
|
||||
DNS: netconf.DNSConfig{
|
||||
Nameservers: []string{
|
||||
"8.8.8.8",
|
||||
"8.8.4.4",
|
||||
@@ -82,8 +83,10 @@ func recovery(initFailure error) {
|
||||
}
|
||||
|
||||
_, err = config.ChainCfgFuncs(&recoveryConfig,
|
||||
loadImages,
|
||||
recoveryServices)
|
||||
[]config.CfgFuncData{
|
||||
config.CfgFuncData{"loadImages", loadImages},
|
||||
config.CfgFuncData{"recovery console", recoveryServices},
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user