Use sh to parse and exec IPMI command

- Fixes: #1663

Signed-off-by: Elmar Pruesse <pruessee@njhealth.org>
This commit is contained in:
Elmar Pruesse
2025-01-29 20:28:28 -07:00
committed by Jonathon Anderson
parent 085240925b
commit 9ebdb8612b
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