From d3a7f90c0bf7dc2043d6da33b07e219052ae7174 Mon Sep 17 00:00:00 2001 From: "Junfeng (Shawn) Li" Date: Tue, 22 Nov 2022 15:42:48 -0500 Subject: [PATCH] Fix 21.12 feed directory for 22.12 upgrade Details: The 21.12 feed directory is in /www/pages/feed/rel-21.12/. The import.sh script in 22.12 iso is looking for the feed directory in /var/www/pages/feed/rel-21.12/. This commit is to make sure the import.sh is looking at the right feed directory in different CentOS release Test Plan: PASS: ran the upgrade from 21.12 and feed directory is set up PASS: ran the upgrade from 22.06 and feed directory is set up Task: 46918 Story: 2009303 Signed-off-by: Junfeng (Shawn) Li Change-Id: I30ea6403c336daa618c9b650ba94cfa1f94533f8 --- bsp-files/upgrades/import.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bsp-files/upgrades/import.sh b/bsp-files/upgrades/import.sh index 98970289..488cc9e9 100644 --- a/bsp-files/upgrades/import.sh +++ b/bsp-files/upgrades/import.sh @@ -39,7 +39,13 @@ source $SCRIPT_DIR/version source /etc/build.info FEED_DIR=/var/www/pages/feed/rel-${VERSION} + +# Feed directory is different in 21.12 vs. 22.06 CURRENT_FEED_DIR=/var/www/pages/feed/rel-${SW_VERSION} +if [ ${SW_VERSION} == "21.12" ]; then + CURRENT_FEED_DIR=/www/pages/feed/rel-${SW_VERSION} + FEED_DIR=/www/pages/feed/rel-${VERSION} +fi rm -rf ${FEED_DIR} mkdir -p ${FEED_DIR}