File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -132,11 +132,13 @@ function ShowProgressBar() {
132
132
return " ${EXIT_SUCCESS} "
133
133
fi
134
134
135
+ # Print progress bar: use carriage return to overwrite command line content
135
136
for i in " ${SPIN[@]} " ; do
136
137
echo -ne " \r[${i} ] ${1} "
137
138
sleep 0.5s
138
139
done
139
140
141
+ # Clear command line content + carriage return
140
142
echo -ne " \033[1K\r"
141
143
}
142
144
@@ -219,7 +221,7 @@ function UpgradeCPLDFW_Worker() {
219
221
local -r _CPLD_REFRESH_FILE=" ${2} "
220
222
local -r _ASIC_DEV=" $( find /dev/mst -iname ' *_pciconf0' ) "
221
223
222
- if [[ " ${UPDATE_MLNX_CPLD_FW} " = " 1 " ]]; then
224
+ if [[ -f /tmp/cpld_fw_updated ]]; then
223
225
RunCmd " cpldupdate --dev ${_ASIC_DEV} ${_CPLD_REFRESH_FILE} "
224
226
return " ${EXIT_SUCCESS} "
225
227
fi
@@ -231,7 +233,7 @@ function UpgradeCPLDFW_Worker() {
231
233
function UpgradeCPLDFW() {
232
234
local -r _CPLD_ARCHIVE=" $1 "
233
235
234
- if [[ " ${UPDATE_MLNX_CPLD_FW} " = " 1 " ]]; then
236
+ if [[ -f /tmp/cpld_fw_updated ]]; then
235
237
LogWarning " forced CPLD refresh was requested for ${ONIE_PLATFORM} "
236
238
CPLD_UPGRADE=" ${YES_PARAM} "
237
239
fi
You can’t perform that action at this time.
0 commit comments