Copy USM scripts to software dir on fresh install

This commit copies the USM scripts to a versioned script directory
under /opt/software during a fresh install, so that in the future,
when deploy precheck is supported for patches, the patches can use
the GA major release precheck if they don't contain a new precheck
script, and also for the scenario where an user wants to remove
all the patches from the system, reverting to the GA release.

Test Plan
PENDING: run "software deploy precheck" for current running release
PENDING: run "software deploy precheck" for a patch that does not
      include a precheck script

Story: 2010676
Task:

Change-Id: I1e6313789204107f56fce8da09f6b785994817ee
Signed-off-by: Heitor Matsui <heitorvieira.matsui@windriver.com>
This commit is contained in:
Heitor Matsui 2024-03-06 13:02:36 -03:00
parent 33a4be37bc
commit 529d57c444
1 changed files with 5 additions and 0 deletions

View File

@ -3140,6 +3140,11 @@ else
fi
fi
# Copy current release scripts to software directory
ilog "Creating versioned software scripts directory for current release"
mkdir -p ${IMAGE_ROOTFS}/var/rootdirs/opt/software/rel-${sw_release}/bin
cp -r /instboot/upgrades/software-deploy/* ${IMAGE_ROOTFS}/var/rootdirs/opt/software/rel-${sw_release}.0/bin
# Save the install scripts and kickstart logs
mount /dev/mapper/cgts--vg-log--lv "${IMAGE_ROOTFS}/${LOG_DIR}"
if [ ${?} -ne 0 ] ; then