On 10/31/2013 12:10 PM, Ana Krivokapic wrote:
On 10/30/2013 04:18 PM, Tomas Babej wrote:
Hi,

Adds which package to the requirements, since older distros do not have it by default.

Part of: https://fedorahosted.org/freeipa/ticket/3833



_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

You can use the bash built-in command `command`, instead of `which`, to find out if a program exists:

command -v cacertdir_rehash

In other words, just replace `which` with `command -v`; there's no need to install any additional packages.
--
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.


_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Thanks!

Updated patch attached.



--
Tomas Babej
Associate Software Engeneer | Red Hat | Identity Management
RHCE | Brno Site | IRC: tbabej | freeipa.org

From 1d525d489f8b0a276a4d73a2f23779ae5761a131 Mon Sep 17 00:00:00 2001
From: Tomas Babej <tba...@redhat.com>
Date: Wed, 30 Oct 2013 10:08:08 +0100
Subject: [PATCH] ipatests: Add which package to legacy client advice
 requirements

Part of: https://fedorahosted.org/freeipa/ticket/3833
---
 ipaserver/advise/plugins/legacy_clients.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipaserver/advise/plugins/legacy_clients.py b/ipaserver/advise/plugins/legacy_clients.py
index 1e076bf64b60a4e9add47c87414df825d798f328..6d17f7ecaa5d022190a9f8983e3ea6ab9a66f694 100644
--- a/ipaserver/advise/plugins/legacy_clients.py
+++ b/ipaserver/advise/plugins/legacy_clients.py
@@ -52,7 +52,7 @@ class config_base_legacy_client(Advice):
                          '/etc/openldap/cacerts/ipa.crt\n' % api.env.host)
 
         self.log.comment('Generate hashes for the openldap library')
-        self.log.command('which cacertdir_rehash')
+        self.log.command('command -v cacertdir_rehash')
         self.log.command('if [ $? -ne 0 ] ; then')
         self.log.command(' wget "%s" -O cacertdir_rehash ;' % cacertdir_rehash)
         self.log.command(' chmod 755 ./cacertdir_rehash ;')
@@ -362,7 +362,7 @@ class config_redhat_nss_ldap(config_base_legacy_client):
 
         self.log.comment('Install required packages via yum')
         self.log.command('yum install -y wget openssl nss_ldap '
-                         'authconfig which\n')
+                         'authconfig\n')
 
         self.configure_ca_cert()
 
-- 
1.8.3.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to