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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user