[mellanox] Fix in mlnx-ffb.sh (#2676)

Fixes "No ISSU version file found /etc/mlnx/issu-version"
when rebooting to different image;
Add aditional check condition.

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
This commit is contained in:
Stepan Blyshchak 2019-03-18 17:53:35 +02:00 committed by lguohan
parent cfbc817ea6
commit a45f41ec1b

View File

@ -42,11 +42,16 @@ check_sdk_upgrade()
ISSU_VERSION_FILE_PATH="/etc/mlnx/issu-version" ISSU_VERSION_FILE_PATH="/etc/mlnx/issu-version"
[ -f "${SDK_VERSION_FILE_PATH}" ] || { [ -f "${ISSU_VERSION_FILE_PATH}" ] || {
>&2 echo "No ISSU version file found ${ISSU_VERSION_FILE_PATH}" >&2 echo "No ISSU version file found ${ISSU_VERSION_FILE_PATH}"
break break
} }
[ -f "${FS_MOUNTPOINT}/${ISSU_VERSION_FILE_PATH}" ] || {
>&2 echo "No ISSU version file found ${ISSU_VERSION_FILE_PATH} in ${NEXT_SONIC_IMAGE}"
break
}
CURRENT_ISSU_VERSION="$(cat ${ISSU_VERSION_FILE_PATH})" CURRENT_ISSU_VERSION="$(cat ${ISSU_VERSION_FILE_PATH})"
NEXT_ISSU_VERSION="$(cat ${FS_MOUNTPOINT}/${ISSU_VERSION_FILE_PATH})" NEXT_ISSU_VERSION="$(cat ${FS_MOUNTPOINT}/${ISSU_VERSION_FILE_PATH})"