1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

Rewrite console.sh and docker-init in Go

This commit is contained in:
Josh Curl
2016-08-12 11:05:16 -07:00
parent 889cb9eea8
commit c67475cbaa
10 changed files with 359 additions and 172 deletions

View File

@@ -9,10 +9,9 @@ import (
"path"
"strings"
"github.com/docker/docker/pkg/mount"
log "github.com/Sirupsen/logrus"
"github.com/coreos/coreos-cloudinit/system"
"github.com/docker/docker/pkg/mount"
"github.com/rancher/os/config"
"github.com/rancher/os/util"
)
@@ -47,14 +46,14 @@ func Main() {
}
if console {
applyConsole(cfg)
ApplyConsole(cfg)
}
if preConsole {
applyPreConsole(cfg)
}
}
func applyConsole(cfg *config.CloudConfig) {
func ApplyConsole(cfg *config.CloudConfig) {
if len(cfg.SSHAuthorizedKeys) > 0 {
authorizeSSHKeys("rancher", cfg.SSHAuthorizedKeys, sshKeyName)
authorizeSSHKeys("docker", cfg.SSHAuthorizedKeys, sshKeyName)