Merge "Fix failure to set instdev parameter when we use ks-setup.cfg"

This commit is contained in:
Zuul 2022-11-24 01:25:40 +00:00 committed by Gerrit Code Review
commit d614eda8fc
1 changed files with 12 additions and 4 deletions

View File

@ -962,8 +962,8 @@ true
# This code is only executed if "prestage" is set in the command line
# to the kernel.
%pre-part --interpreter=/bin/bash
HOOK_LABEL="pre-part"
%ks-early --interpreter=/bin/bash
HOOK_LABEL="ks-early"
. /tmp/lat/ks_functions.sh
# First, parse /proc/cmdline to find the boot args
@ -980,8 +980,6 @@ if check_prestage -eq 0 ; then
mkdir -p ${ISODIR}
rootfs_device=${INSTDEV}
# Mount the isofile
mount "${ISO_DEV}" "${ISODIR}"
rc=$?
@ -997,6 +995,7 @@ if check_prestage -eq 0 ; then
# override the INSTDEV based on the information from ks-setup.cfg
export INSTDEV="${rootfs_device}"
export instdev="${rootfs_device}"
ilog "rootfs device is ${INSTDEV}"
@ -3099,5 +3098,14 @@ if [ "${storage}" = true ] ; then
ln -s /usr/share/starlingx/pmon.d/syslog-ng.conf ${IMAGE_ROOTFS}/etc/pmon.d/syslog-ng.conf
fi
if [ -e "/instboot/ks-addon.cfg" ]; then
ilog "Running kickstart addon script"
source /instboot/ks-addon.cfg
rc=$?
if [ "${rc}" -ne 0 ]; then
ilog "Addon script ks-addon.cfg exited with [rc=${rc}]"
fi
fi
true
%end