mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 09:57:41 +00:00
Prefer the python3 in /usr/bin on Solaris.
The /opt/csw version, if it exists, may be a 32-bit version which we can't link with. Also handle the case where the /usr/bin/python3 link is missing.
This commit is contained in:
parent
48c2bd0007
commit
a339945848
@ -411,6 +411,22 @@ case "$osversion" in
|
||||
with_openssl=true
|
||||
# Python plugins
|
||||
with_python=true
|
||||
|
||||
# We prefer the system version of python3 to the
|
||||
# csw one (which may be 32-bit)
|
||||
if [ -z "$PYTHON" ]; then
|
||||
if [ -x /usr/bin/python3 ]; then
|
||||
PYTHON="/usr/bin/python3"; export PYTHON
|
||||
else
|
||||
# Sometimes the /usr/bin/python3 is missing
|
||||
for f in /usr/bin/python3.9 /usr/bin/python3.8 /usr/bin/python3.7 /usr/bin/python3.6 /usr/bin/python3.5 /usr/bin/python3.4 /usr/bin/python3.3 /usr/bin/python3.2 /usr/bin/python3.1 /usr/bin/python3.0; do
|
||||
if [ -x $f ]; then
|
||||
PYTHON="$f"; export PYTHON
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
Loading…
x
Reference in New Issue
Block a user