From a45f41ec1bb0ad14dfc093b595143bc197a893df Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak <38952541+stepanblyschak@users.noreply.github.com> Date: Mon, 18 Mar 2019 17:53:35 +0200 Subject: [PATCH] [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 --- platform/mellanox/mlnx-ffb.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/mellanox/mlnx-ffb.sh b/platform/mellanox/mlnx-ffb.sh index 72187b94f8..1488bb2c6b 100755 --- a/platform/mellanox/mlnx-ffb.sh +++ b/platform/mellanox/mlnx-ffb.sh @@ -42,11 +42,16 @@ check_sdk_upgrade() 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}" 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})" NEXT_ISSU_VERSION="$(cat ${FS_MOUNTPOINT}/${ISSU_VERSION_FILE_PATH})"