Merge branch 'ipmitool-template-quote-escapechar'
This commit is contained in:
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Handle missing ipmi fields during bmc commands. #1768
|
||||
- Properly configure a default IPMI template during `wwctl upgrade nodes --add-defaults`.
|
||||
- Fixed display of dotted field names. #1825
|
||||
- Add single quote around escapechar in ipmitool template #1830
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ func Test_Ipmitool(t *testing.T) {
|
||||
Password: "calvin",
|
||||
},
|
||||
},
|
||||
cmdStr: `ipmitool -I lanplus -e ~ -p 687 -H 192.168.1.100 -U "root" -P "calvin" chassis power status`,
|
||||
cmdStr: `ipmitool -I lanplus -e "~" -p 687 -H 192.168.1.100 -U "root" -P "calvin" chassis power status`,
|
||||
},
|
||||
"nobmc PowerStatus full": {
|
||||
bmc: TemplateStruct{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{ $cmd := "ipmitool" }}
|
||||
{{ if .Interface }}{{ $cmd = cat $cmd "-I" .Interface }}{{ end }}
|
||||
{{ if .EscapeChar }}{{ $cmd = cat $cmd "-e" .EscapeChar }}{{ end }}
|
||||
{{ if .EscapeChar }}{{ $cmd = cat $cmd "-e" (printf "\"%s\"" .EscapeChar) }}{{ end }}
|
||||
{{ if .Port }}{{ $cmd = cat $cmd "-p" .Port }}{{ end }}
|
||||
{{ if .Ipaddr }}{{ $cmd = cat $cmd "-H" .Ipaddr }}{{ end }}
|
||||
{{ if .UserName }}{{ $cmd = cat $cmd "-U" (printf "\"%s\"" .UserName) }}{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user