Add pxeboot config files to feed
This commit is to copy the pxeboot template files to pxelinux.cfg.files directory in the feed directory from /var/pxeboot/pxelinux.cfg.files/. This is to fix an issue in the scenario where the controller current release feed directory doesn't have pxelinux.cfg.files folder after deployment and this will affect subcloud prestaging as pxelinux.cfg.files folder is needed for upgrade. Test Plan: PASS: build and deploy the iso in SX PASS: system controller controller-1 has the pxelinux.cfg.files after pxeboot PASS: pxeboot installation interrupted when failure occurs Task: 51482 Story: 2010676 Change-Id: I750d41734085e790d12a09869ca3b2729161c041 Signed-off-by: junfeng-li <junfeng.li@windriver.com>
This commit is contained in:
parent
920da5b194
commit
2337299893
@ -3113,6 +3113,34 @@ if [ "${controller}" = true ] ; then
|
||||
# This fetch is only needed once because the repo is stored in /var
|
||||
set_variable "ostree_repo_fetched"
|
||||
|
||||
####################################################################
|
||||
# Fetch and add pxeboot template files in /var/pxeboot/pxelinux.cfg.files/
|
||||
# to the feed directory
|
||||
#####################################################################
|
||||
|
||||
mkdir -p ${feed}/pxeboot/pxelinux.cfg.files
|
||||
|
||||
# handle USB install
|
||||
if is_usb_install -eq 0 ; then
|
||||
ilog "Copying pxelinux.cfg.files for USB install"
|
||||
cp -a ${pxeboot}/pxelinux.cfg.files/* ${feed}/pxeboot/pxelinux.cfg.files
|
||||
else
|
||||
ilog "Fetching pxelinux.cfg.files for pxeboot install"
|
||||
feed_remote_url=$(echo ${insturl} | sed -e 's/ostree_repo/pxeboot\/pxelinux\.cfg\.files\//g')
|
||||
cd ${feed}/pxeboot/pxelinux.cfg.files
|
||||
|
||||
wget ${NOVERIFYSSL_WGET_OPT} -q --spider ${feed_remote_url}
|
||||
if [ $? -eq 0 ]; then
|
||||
ilog "Fetching pxelinux template files from ${feed_remote_url}"
|
||||
wget ${NOVERIFYSSL_WGET_OPT} -r -np -nH --cut-dirs=4 -R "index.html*" ${feed_remote_url} \
|
||||
-o /${LAT_DIR}/wget_pxelinux_files.log
|
||||
# Configure the file permissions for PXE and EFI files
|
||||
find . -type f \( -name "pxe*" -o -name "efi*" \) -exec chmod 755 {} +
|
||||
ilog "pxelinux.cfg.files fetch completed"
|
||||
else
|
||||
report_failure_with_msg "Failed to get pxeboot template files from ${feed_remote_url}"
|
||||
fi
|
||||
fi
|
||||
|
||||
####################################################################
|
||||
# Fetch and add efi.img to /var/pxeboot
|
||||
|
Loading…
x
Reference in New Issue
Block a user