diff options
author | Alexander Bokovoy <abokovoy@redhat.com> | 2011-07-01 12:41:45 +0300 |
---|---|---|
committer | Alexander Bokovoy <abokovoy@redhat.com> | 2011-07-29 12:58:10 +0300 |
commit | 4c4b8a8189b5390628890717c01f2b6cb3e06c6a (patch) | |
tree | b7cc9626955c363a0a8cf39c3316b2f7a9c7c84d /ipa-client/ipa-install | |
parent | 1ebe3c1d12e8694baa00c713a60122a40a0c51a3 (diff) | |
download | freeipa-4c4b8a8189b5390628890717c01f2b6cb3e06c6a.tar.gz freeipa-4c4b8a8189b5390628890717c01f2b6cb3e06c6a.tar.xz freeipa-4c4b8a8189b5390628890717c01f2b6cb3e06c6a.zip |
Make error reporting more 'local' for various configurations of nss_ldap packages
https://fedorahosted.org/freeipa/ticket/1369
When nss_ldap-based configuration does not work, report proper package name instead of always assuming nss_ldap.
At least, in RHEL6 and Fedora appropriate package is called nss-pam-ldapd while in older releases and other
distributions it might be called differently.
The change makes less confusing error reporting. It also introduces common utility function package_installed_name()
which provides an interface to query package manager for existence of mutually exclusive packages which is
helpful to distinguish between different configuration paths.
Diffstat (limited to 'ipa-client/ipa-install')
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 2e1a28ca0..6ad001be8 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -31,7 +31,7 @@ try: from ipaclient import ipadiscovery import ipaclient.ipachangeconf import ipaclient.ntpconf - from ipapython.ipautil import run, user_input, CalledProcessError, file_exists + from ipapython.ipautil import run, user_input, CalledProcessError, file_exists, package_installed_name from ipapython import ipautil from ipapython import dnsclient from ipapython import sysrestore @@ -989,7 +989,8 @@ def main(): n = n + 1 if not found: - print "nss_ldap is not able to use DNS discovery!" + package = package_installed_name(["nss-pam-ldapd","nss_ldap"]) + print "Unable to use DNS discovery! Recognized configuration: %s" % (package) print "Changing configuration to use hardcoded server name: " +cli_server try: |