From 554e25d6cb108cffdabeacbb8d6c115528c73c9d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 2 Feb 2022 11:17:08 -0500 Subject: [PATCH] Assume libcrypt.so.1 if not 2 in more generic way --- .../common/initramfs/opt/confluent/bin/apiclient | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient b/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient index 7eade1e2..6375fdc3 100644 --- a/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient +++ b/confluent_osdeploy/common/initramfs/opt/confluent/bin/apiclient @@ -23,10 +23,10 @@ def msg_align(len): cryptname = ctypes.util.find_library('crypt') if not cryptname: - if os.path.exists('/lib64/libcrypt.so.1'): - cryptname = 'libcrypt.so.1' - elif os.path.exists('/lib64/libcrypt.so.2'): + if os.path.exists('/lib64/libcrypt.so.2') or os.path.exists('/usr/lib64/libcrypt.so.2'): cryptname = 'libcrypt.so.2' + else: + cryptname = 'libcrypt.so.1' c_libcrypt = ctypes.CDLL(cryptname) c_crypt = c_libcrypt.crypt c_crypt.argtypes = (ctypes.c_char_p, ctypes.c_char_p)