Merge "Copy USM scripts to software dir on fresh install"
This commit is contained in:
commit
8111d098fc
|
@ -3148,6 +3148,20 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Copy current release scripts to software directory
|
||||||
|
highest_patch_version="0"
|
||||||
|
for metadata_file in /instboot/patches/*; do
|
||||||
|
patch_version=$(grep "sw_version" $metadata_file | cut -d"." -f3 | cut -d'<' -f1)
|
||||||
|
if [ $patch_version -gt $highest_patch_version ]; then
|
||||||
|
highest_patch_version=$patch_version;
|
||||||
|
fi;
|
||||||
|
done;
|
||||||
|
|
||||||
|
versioned_dir="/opt/software/rel-${sw_release}.${highest_patch_version}/bin"
|
||||||
|
ilog "Creating versioned USM scripts directory $versioned_dir for current release"
|
||||||
|
mkdir -p "${IMAGE_ROOTFS}/var/rootdirs/${versioned_dir}"
|
||||||
|
cp -r /instboot/upgrades/software-deploy/* ${IMAGE_ROOTFS}/var/rootdirs/${versioned_dir}
|
||||||
|
|
||||||
# Save the install scripts and kickstart logs
|
# Save the install scripts and kickstart logs
|
||||||
mount /dev/mapper/cgts--vg-log--lv "${IMAGE_ROOTFS}/${LOG_DIR}"
|
mount /dev/mapper/cgts--vg-log--lv "${IMAGE_ROOTFS}/${LOG_DIR}"
|
||||||
if [ ${?} -ne 0 ] ; then
|
if [ ${?} -ne 0 ] ; then
|
||||||
|
|
Loading…
Reference in New Issue