support import previous compatible load

Add support for importing load with import.sh from the current load.
This enables to always import load with higher version import.sh (in the
case of load-import --inactive)

TCs:
    passed: from system controller running 23.09 load, import 22.12 load
    passed: regression import N+1 load

Story: 2010611
Task: 48371

Change-Id: I4aec6eaa89019d4852979c27a708e409f32e27b0
Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
Bin Qian 2023-07-12 17:42:55 +00:00
parent d8b704472b
commit 005544b651
1 changed files with 10 additions and 3 deletions

View File

@ -32,10 +32,17 @@ error() {
trap 'error ${LINENO} $?' ERR
SCRIPT_DIR=$(dirname $0)
ISO_DIR=$(dirname $SCRIPT_DIR)
if [ -n "$1" ]; then
# mount point of the ISO to be imported.
# This is to import inactive load (an older load)
ISO_DIR=$1
UPGRADES_DIR="${ISO_DIR}/upgrades"
else
UPGRADES_DIR=$(dirname $0)
ISO_DIR=$(dirname ${UPGRADES_DIR})
fi
source $SCRIPT_DIR/version
source ${UPGRADES_DIR}/version
source /etc/build.info
FEED_DIR=/var/www/pages/feed/rel-${VERSION}