Look for libcrypto in both /opt/tools and /opt/local on Illumos-based distros.

This commit is contained in:
C. R. Oldham 2017-05-05 09:04:35 -06:00
parent fc26fb8a05
commit a4f7aa145e

View File

@ -38,9 +38,10 @@ def _load_libcrypto():
# Solaris-like distribution that use pkgsrc have # Solaris-like distribution that use pkgsrc have
# libraries in a non standard location. # libraries in a non standard location.
# (SmartOS, OmniOS, OpenIndiana, ...) # (SmartOS, OmniOS, OpenIndiana, ...)
lib = glob.glob(os.path.join( # This could be /opt/tools/lib (Global Zone)
'/opt/local/lib', # or /opt/local/lib (non-Global Zone), thus the
'libcrypto.so*')) # two checks below
lib = glob.glob('/opt/local/lib/libcrypto.so*') + glob.glob('/opt/tools/lib/libcrypto.so*')
lib = lib[0] if len(lib) > 0 else None lib = lib[0] if len(lib) > 0 else None
if lib: if lib:
return cdll.LoadLibrary(lib) return cdll.LoadLibrary(lib)