Merge "Add USM pxeboot support"
This commit is contained in:
commit
9b5b6b2392
@ -3191,7 +3191,9 @@ fi
|
||||
|
||||
# Copy current release scripts to software directory
|
||||
highest_patch_version="0"
|
||||
for metadata_file in /instboot/patches/*; do
|
||||
# All patch metadata xml files were presumably copied to /opt/software/metadata/deployed/ by the code above
|
||||
# The assumption allows us not retrieve the xml files from the source again
|
||||
for metadata_file in ${IMAGE_ROOTFS}/var/rootdirs/opt/software/metadata/deployed/*; 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;
|
||||
@ -3199,9 +3201,31 @@ for metadata_file in /instboot/patches/*; do
|
||||
done;
|
||||
|
||||
versioned_dir="/opt/software/rel-${sw_release}.${highest_patch_version}/bin"
|
||||
ilog "Creating versioned USM scripts directory $versioned_dir for current release"
|
||||
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}
|
||||
ilog "Creating USM upgrades directory in ${feed}"
|
||||
mkdir -p "${feed}/upgrades"
|
||||
|
||||
if is_usb_install -eq 0 ; then
|
||||
ilog "Copying USM software deploy scripts to ${IMAGE_ROOTFS}/var/rootdirs/${versioned_dir}"
|
||||
cp -r /instboot/upgrades/software-deploy/* ${IMAGE_ROOTFS}/var/rootdirs/${versioned_dir}
|
||||
ilog "Copying USM upgrades directory to ${feed}"
|
||||
cp -r /instboot/upgrades/* ${feed}/upgrades
|
||||
else
|
||||
upgrade_url=$(echo ${insturl} | sed -e 's/ostree_repo/upgrades/g')
|
||||
ilog "Getting USM upgrades directory from ${upgrade_url}"
|
||||
wget ${NOVERIFYSSL_WGET_OPT} -q --spider ${upgrade_url}/
|
||||
if [ $? -eq 0 ]; then
|
||||
ilog "Downloading USM upgrades directory from ${upgrade_url}"
|
||||
cd ${feed}/upgrades
|
||||
wget ${NOVERIFYSSL_WGET_OPT} -r -np -nH --cut-dirs=3 -R "index.html*" \
|
||||
${upgrade_url}/ -o /${LAT_DIR}/wget_usm_upgrades.log
|
||||
ilog "USM upgrades directory download complete"
|
||||
ilog "Copy software-deploy directory to ${IMAGE_ROOTFS}/var/rootdirs/${versioned_dir}"
|
||||
cp -r ${feed}/upgrades/software-deploy/* ${IMAGE_ROOTFS}/var/rootdirs/${versioned_dir}
|
||||
ilog "Copy software-deploy directory complete"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Save the install scripts and kickstart logs
|
||||
mount /dev/mapper/cgts--vg-log--lv "${IMAGE_ROOTFS}/${LOG_DIR}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user