mirror of
https://github.com/rancher/os.git
synced 2025-10-22 16:13:53 +00:00
Log update-ssh-keys to stdout/stderr
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package cloudinit
|
package cloudinit
|
||||||
|
|
||||||
import(
|
import (
|
||||||
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
log "github.com/Sirupsen/logrus"
|
log "github.com/Sirupsen/logrus"
|
||||||
@@ -9,6 +10,8 @@ import(
|
|||||||
func authorizeSSHKeys(user string, authorizedKeys []string, name string) {
|
func authorizeSSHKeys(user string, authorizedKeys []string, name string) {
|
||||||
for _, authorizedKey := range authorizedKeys {
|
for _, authorizedKey := range authorizedKeys {
|
||||||
cmd := exec.Command("update-ssh-keys", user, authorizedKey)
|
cmd := exec.Command("update-ssh-keys", user, authorizedKey)
|
||||||
|
cmd.Stdout = os.Stdout
|
||||||
|
cmd.Stderr = os.Stderr
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err.Error())
|
log.Fatal(err.Error())
|
||||||
|
Reference in New Issue
Block a user