Add /usr/libexec/platform-python to salt-ssh python paths

This commit is contained in:
Mickaël 'lastmikoi' FALCK 2022-06-28 23:28:59 +02:00
parent d5e00219f1
commit f611fbe66d
No known key found for this signature in database
GPG key ID: 129A314B0810B0B0
2 changed files with 2 additions and 1 deletions

1
changelog/62235.fixed Normal file
View file

@ -0,0 +1 @@
Fix salt-ssh not detecting `platform-python` as a valid interpreter on EL8

View file

@ -146,7 +146,7 @@ if [ "$SUDO" ] && [ "$SUDO_USER" ]
then SUDO="$SUDO -u $SUDO_USER"
fi
EX_PYTHON_INVALID={EX_THIN_PYTHON_INVALID}
PYTHON_CMDS="python3 python27 python2.7 python26 python2.6 python2 python"
PYTHON_CMDS="python3 python27 python2.7 python26 python2.6 python2 python /usr/libexec/platform-python"
for py_cmd in $PYTHON_CMDS
do
if command -v "$py_cmd" >/dev/null 2>&1 && "$py_cmd" -c "import sys; sys.exit(not (sys.version_info >= (2, 6)));"