From 82f8dae54086f24570927d6cc9596659fb543c68 Mon Sep 17 00:00:00 2001 From: Thomas Woerner <twoerner@redhat.com> Date: Mon, 22 Jul 2019 17:21:51 +0200 Subject: [PATCH] ipaclient_setup_nss: paths.GETENT is not available before freeipa-4.6.90.pre1 Fallback for older releases has been added to use '/usr/bin/getent' if paths.GETENT is not defined. --- roles/ipaclient/library/ipaclient_setup_nss.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/ipaclient/library/ipaclient_setup_nss.py b/roles/ipaclient/library/ipaclient_setup_nss.py index ec6009f1..d43eeb9a 100644 --- a/roles/ipaclient/library/ipaclient_setup_nss.py +++ b/roles/ipaclient/library/ipaclient_setup_nss.py @@ -460,6 +460,10 @@ def main(): # It can sometimes take a few seconds to connect to the remote # provider. # Particulary, SSSD might take longer than 6-8 seconds. + if hasattr(paths, "GETENT"): + getent_cmd = paths.GETENT + else: + getent_cmd = '/usr/bin/getent' while n < 10 and not found: try: ipautil.run([getent_cmd, "passwd", user]) -- GitLab