@@ -170,26 +170,21 @@ function request_pre_shutdown()
170
170
}
171
171
}
172
172
173
- function recover_issu_bank_file_instruction ()
173
+ function recover_issu_bank_file ()
174
174
{
175
- debug " To recover (${ISSU_BANK_FILE} ) file, do the following:"
176
- debug " $ docker exec -it syncd sx_api_dbg_generate_dump.py"
177
- debug " $ docker exec -it syncd cat /tmp/sdkdump | grep 'ISSU Bank'"
178
- debug " Command above will print the VALUE of ISSU BANK - 0 or 1, use this VALUE in the next command"
179
- debug " $ printf VALUE > /host/warmboot/issu_bank.txt"
175
+ debug " Recovering the (${ISSU_BANK_FILE} ) file"
176
+ docker exec -it syncd sx_api_dbg_generate_dump.py
177
+ issu_bank_value=` docker exec -it syncd cat /tmp/sdkdump | grep ' ISSU Bank' | grep -o -E ' [0-9]+' `
178
+ printf $issu_bank_value > /host/warmboot/issu_bank.txt
180
179
}
181
180
182
181
function check_issu_bank_file()
183
182
{
184
183
ISSU_BANK_FILE=/host/warmboot/issu_bank.txt
185
- MLNX_ISSU_BANK_BROKEN=102
186
184
187
185
if [[ ! -s " $ISSU_BANK_FILE " ]]; then
188
186
error " (${ISSU_BANK_FILE} ) does NOT exist or empty ..."
189
- recover_issu_bank_file_instruction
190
- if [[ " $1 " = true ]]; then
191
- exit " ${MLNX_ISSU_BANK_BROKEN} "
192
- fi
187
+ recover_issu_bank_file
193
188
return
194
189
fi
195
190
@@ -199,10 +194,7 @@ function check_issu_bank_file()
199
194
if [[ $issu_file_chars_count != 1 ]] ||
200
195
[[ " $issu_file_content " != " 0" && " $issu_file_content " != " 1" ]]; then
201
196
error " (${ISSU_BANK_FILE} ) is broken ..."
202
- recover_issu_bank_file_instruction
203
- if [[ " $1 " = true ]]; then
204
- exit " ${MLNX_ISSU_BANK_BROKEN} "
205
- fi
197
+ recover_issu_bank_file
206
198
fi
207
199
}
208
200
0 commit comments