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

Rewrite update-ssh-keys in Go

This commit is contained in:
Josh Curl
2016-11-16 13:02:35 -08:00
parent 2b0638c95f
commit bba93792d5
4 changed files with 105 additions and 32 deletions

View File

@@ -56,8 +56,12 @@ func Main() {
func ApplyConsole(cfg *rancherConfig.CloudConfig) {
if len(cfg.SSHAuthorizedKeys) > 0 {
authorizeSSHKeys("rancher", cfg.SSHAuthorizedKeys, sshKeyName)
authorizeSSHKeys("docker", cfg.SSHAuthorizedKeys, sshKeyName)
if err := authorizeSSHKeys("rancher", cfg.SSHAuthorizedKeys, sshKeyName); err != nil {
log.Error(err)
}
if err := authorizeSSHKeys("docker", cfg.SSHAuthorizedKeys, sshKeyName); err != nil {
log.Error(err)
}
}
WriteFiles(cfg, "console")