Use sh to parse and exec IPMI command
- Fixes: #1663 Signed-off-by: Elmar Pruesse <pruessee@njhealth.org>
This commit is contained in:
committed by
Jonathon Anderson
parent
085240925b
commit
9ebdb8612b
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user