From cd251fa5d6cc2409eb42e3ee001b7aa35ba498ca Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 10 Dec 2020 10:54:30 -0500 Subject: [PATCH] Add support for OL7 and older other EL7 flavors Older EL7 didn't have platform-python in installer, change to fallback to old /usr/bin/python if needed. --- confluent_osdeploy/el7/profiles/default/scripts/functions | 6 +++++- confluent_server/confluent/osimage.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/el7/profiles/default/scripts/functions b/confluent_osdeploy/el7/profiles/default/scripts/functions index c299d30d..c03e68ab 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/functions +++ b/confluent_osdeploy/el7/profiles/default/scripts/functions @@ -60,7 +60,11 @@ run_remote_python() { mkdir -p $(dirname $1) curl -f -sS $curlargs https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 if [ $? != 0 ]; then echo "'$*'" failed to download; return 1; fi - /usr/libexec/platform-python $* + if [ -x /usr/libexec/platform-python ]; then + /usr/libexec/platform-python $* + else + /usr/bin/python $* + fi retcode=$? echo "'$*' exited with code $retcode" cd - > /dev/null diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 50043eef..97035f9e 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -346,7 +346,7 @@ def _priv_check_oraclelinux(isoinfo): ver = None arch = None for entry in isoinfo[0]: - if 'oraclelinux-release-8' in entry: + if 'oraclelinux-release-' in entry: ver = entry.split('-')[2] arch = entry.split('.')[-2] break