mirror of
https://github.com/kubereboot/kured.git
synced 2026-05-20 23:33:22 +00:00
committed by
Jean-Philippe Evrard
parent
8093053275
commit
d677b436a0
@@ -3,10 +3,11 @@ package reboot
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/google/shlex"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/google/shlex"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// CommandRebooter holds context-information for a reboot with command
|
||||
@@ -20,7 +21,7 @@ func (c CommandRebooter) Reboot() error {
|
||||
|
||||
bufStdout := new(bytes.Buffer)
|
||||
bufStderr := new(bytes.Buffer)
|
||||
cmd := exec.Command(c.RebootCommand[0], c.RebootCommand[1:]...)
|
||||
cmd := exec.Command(c.RebootCommand[0], c.RebootCommand[1:]...) // #nosec G204
|
||||
cmd.Stdout = bufStdout
|
||||
cmd.Stderr = bufStderr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user