mirror of
https://github.com/rancher/os.git
synced 2025-08-05 00:39:37 +00:00
Log update-ssh-keys to stdout/stderr
This commit is contained in:
parent
123b81886b
commit
5d2d23d988
@ -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())
|
||||||
|
Loading…
Reference in New Issue
Block a user