From aed96a2711d5fb4f002382b1131b0371bc5e9abb Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 5 Aug 2020 09:45:22 -0400 Subject: [PATCH] Add RHV4.4 support to RHV4 Again, we need to handle the drastic differences in python between *minor* versions of RHVH --- confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh b/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh index 3788f5f1..d116ef80 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh @@ -63,9 +63,14 @@ if [ -e /tmp/installdisk ]; then echo autopart --type=thinp --nohome $LUKSPARTY >> /tmp/partitioning fi cd $(mktemp -d) -python /etc/confluent/apiclient /confluent-public/os/$profile/image.rpm -o image.rpm +if [ -x /usr/bin/python ]; then + pythton=/usr/bin/python +elif [ -x /usr/libexec/platform-python ]; then + python=/usr/libexec/platform-python +fi +$python /etc/confluent/apiclient /confluent-public/os/$profile/image.rpm -o image.rpm rpm2cpio image.rpm | cpio -dumi ln -s $(find $(pwd) -name *img) /tmp/install.img cd - -python /etc/confluent/apiclient /confluent-public/os/$profile/kickstart.custom -o /tmp/kickstart.custom +$python /etc/confluent/apiclient /confluent-public/os/$profile/kickstart.custom -o /tmp/kickstart.custom run_remote pre.custom