Skip to content

Commit 523192b

Browse files
JackThomson2roypat
authored andcommitted
fix: Stop the scan for vmlinux failing
Previously this would fail on x86 as we set -e. By setting the || true this means the script will continue. The grubby step next will fail if it failed to find the image. Signed-off-by: Jack Thomson <jackabt@amazon.com>
1 parent d4879a0 commit 523192b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

resources/hiding_ci/build_and_install_kernel.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ al2023_update_boot() {
122122
dracut --kver $KERNEL_VERSION -f -v
123123

124124
# This varies from x86 and ARM so capture what was generated
125-
VM_LINUX_LOCATION=$(ls /boot/vmlinu{x,z}-$KERNEL_VERSION 2>/dev/null | head -n1)
125+
# We add the || true here due to the fact that we have pipefail enabled
126+
# this causes a non 0 exit when ls cant find vmlinux or vmlinux
127+
VM_LINUX_LOCATION=$(ls /boot/vmlinu{x,z}-$KERNEL_VERSION 2>/dev/null | head -n1 || true)
126128

127129
echo "Updating GRUB..."
128130
grubby --grub2 --add-kernel $VM_LINUX_LOCATION \

0 commit comments

Comments
 (0)