Merge pull request #1664 from epruesse/patch-2

Use sh to parse and exec IPMI command (fixes #1663)
This commit is contained in:
Jonathon Anderson
2025-01-31 15:52:18 -07:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix default nodes.conf to use the new kernel command line list format. #1670
- Fix `make install` when `sudo` does not set `$PWD`. #1660
- Use sh to parse and exec IPMI command. #1663
## v4.6.0rc1, 2025-01-29

View File

@@ -67,7 +67,7 @@ func (ipmi *IPMI) Command() ([]byte, error) {
if ipmi.ShowOnly {
return []byte(cmdStr), nil
}
ipmiCmd := exec.Command(cmdStr)
ipmiCmd := exec.Command("/bin/sh", "-c", cmdStr)
return ipmiCmd.CombinedOutput()
}
@@ -76,7 +76,7 @@ func (ipmi *IPMI) InteractiveCommand() (err error) {
if err != nil {
return err
}
ipmiCmd := exec.Command(cmdStr)
ipmiCmd := exec.Command("/bin/sh", "-c", cmdStr)
ipmiCmd.Stdout = os.Stdout
ipmiCmd.Stdin = os.Stdin
ipmiCmd.Stderr = os.Stderr