From 172c57c6f19f8a5bc593fb13ac76df9afee87bf4 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 15 May 2024 12:28:41 -0400 Subject: [PATCH] Fix media location search for EL8 EL8 distributions marked the 'OS' as dracut, workaround by trying to use PRETTY_NAME --- .../usr/lib/dracut/hooks/pre-trigger/01-confluent.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh index a1778e08..caa60997 100644 --- a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh +++ b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh @@ -228,6 +228,15 @@ if [ "$textconsole" = "true" ] && ! grep console= /proc/cmdline > /dev/null; the fi . /etc/os-release +if [ "$ID" = "dracut" ]; then + ID=$(echo $PRETTY_NAME|awk '{print $1}') + VERSION_ID=$(echo $VERSION|awk '{print $1}') + if [ "$ID" = "Oracle" ]; then + ID=OL + elif [ "$ID" = "Red" ]; then + ID=RHEL + fi +fi ISOSRC=$(blkid -t TYPE=iso9660|grep -Ei ' LABEL="'$ID-$VERSION_ID|sed -e s/:.*//) if [ -z "$ISOSRC" ]; then echo inst.repo=$proto://$mgr/confluent-public/os/$profilename/distribution >> /etc/cmdline.d/01-confluent.conf