From 476a371ef9093ae6a5d34fe38db51eccdf121071 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Wed, 21 Feb 2024 15:20:42 -0500 Subject: [PATCH] tests/var-mount/scsi-id: simplify bootloader entry finding We don't have to be super strict here in how we find the bootloader entry. There should only be one, so simplify the logic using a glob instead. Motivated by the fact that this will break otherwise as part of https://github.com/openshift/os/pull/1445 where the `ID` will be `centos`, but the stateroot will still be `scos`. --- tests/kola/var-mount/scsi-id/test.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/kola/var-mount/scsi-id/test.sh b/tests/kola/var-mount/scsi-id/test.sh index afb834a5e3..4885786856 100755 --- a/tests/kola/var-mount/scsi-id/test.sh +++ b/tests/kola/var-mount/scsi-id/test.sh @@ -18,15 +18,7 @@ if [ $fstype != xfs ]; then fatal "Error: /var fstype is $fstype, expected is xfs" fi -source /etc/os-release -ostree_conf="" -if [ "$ID" == "fedora" ]; then - ostree_conf="/boot/loader.1/entries/ostree-1-fedora-coreos.conf" -elif [[ "${ID_LIKE}" =~ "rhel" ]]; then - ostree_conf="/boot/loader.1/entries/ostree-1-${ID}.conf" -else - fatal "fail: not operating on expected OS" -fi +ostree_conf=$(ls /boot/loader/entries/*.conf) initramfs=/boot$(grep initrd ${ostree_conf} | sed 's/initrd //g') tempfile=$(mktemp)