Update input_file in pxeboot-update script

Commit [1] added backward compatibility for lowlatency upgrades,
since the lowlatency pxe files were removed by [2]. However, one
of the input files used by the script are not being updated and
still contains "_lowlatency" name, making the script to fail in
lowlatency systems. This commit fixes the file name.

[1] https://review.opendev.org/c/starlingx/metal/+/928261
[2] https://review.opendev.org/c/starlingx/metal/+/888358

Test Plan
PASS: AIO-SX - run pxeboot-upgrade-24.09.sh script manually with input file set
      as '-i /var/pxeboot/pxelinux.cfg.files/pxe-smallsystem_lowlatency-install-24.09'
PASS: AIO-SX - lock/unlock host

Story: 2010676
Task: 50985

Change-Id: I94c47c0c1ffd9b560f573f85f3402f3534292a3e
Signed-off-by: Heitor Matsui <heitorvieira.matsui@windriver.com>
This commit is contained in:
Heitor Matsui 2024-09-09 15:20:39 -03:00
parent 8d530d8362
commit 6555b03e73

View File

@ -77,10 +77,12 @@ do
case $opt in case $opt in
i) i)
input_file=$OPTARG input_file=$OPTARG
input_file_dirname=$(dirname $input_file)
input_file_basename=$(basename $input_file) input_file_basename=$(basename $input_file)
# lowlatency files removed. Added for backwards compatibility # lowlatency files removed. Added for backwards compatibility
fixed_input_file_basename=$(echo $input_file_basename | sed 's/_lowlatency//') fixed_input_file_basename=$(echo $input_file_basename | sed 's/_lowlatency//')
input_file_efi=$(dirname $input_file)/efi-$fixed_input_file_basename input_file=${input_file_dirname}/${fixed_input_file_basename}
input_file_efi=${input_file_dirname}/efi-${fixed_input_file_basename}
;; ;;
o) o)
output_file=$OPTARG output_file=$OPTARG