[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Freeipa-devel] [PATCH] fix client install



Adding a missing 'action' statement to the ldap.conf updater.

Fixed a small typo.

Moved the imports into a try/except so that ctrl-C is always caught.

rob
# HG changeset patch
# User Rob Crittenden <rcritten redhat com>
# Date 1204147058 18000
# Node ID 1ce2147fdef549a0d4fca088d18be8316436c8e6
# Parent  ccfddf5fbafc78fe3bc0c9138eb08664789e44c3
Add action statement to ldap.conf update
Move imports into try/except so that ctrl-C can always be caught
Fix typo

diff -r ccfddf5fbafc -r 1ce2147fdef5 ipa-client/ipa-install/ipa-client-install
--- a/ipa-client/ipa-install/ipa-client-install	Wed Feb 27 15:14:52 2008 -0500
+++ b/ipa-client/ipa-install/ipa-client-install	Wed Feb 27 16:17:38 2008 -0500
@@ -20,17 +20,6 @@
 #
 
 VERSION = "%prog .1"
-
-import sys
-
-import krbV
-import socket
-import logging
-from optparse import OptionParser
-import ipaclient.ipadiscovery
-import ipaclient.ipachangeconf
-import ipaclient.ntpconf
-from ipa.ipautil import run
 
 def parse_options():
     parser = OptionParser(version=VERSION)
@@ -184,7 +173,7 @@ def main():
         ldapconf.newConf("/etc/ldap.conf", opts)
         print "Configured /etc/ldap.conf"
     except Exception, e:
-        print "Configuration failed: " + str(e)
+        print "Creation of /etc/ldap.conf: " + str(e)
         return 1
 
     #Check if kerberos is already configured properly
@@ -254,15 +243,15 @@ def main():
         try:
             run(["getent", "passwd", "admin"])
         except Exception, e:
-            print "nss_ldap is not able to use DNS disccovery!"
+            print "nss_ldap is not able to use DNS discovery!"
             print "Changing configuration to use hardcoded server name: " + ds.getServerName()
 
-            opts = [{'name':'uri', 'type':'option', 'value':'ldap://'+ds.getServerName()},
+            opts = [{'name':'uri', 'type':'option', 'action':'set', 'value':'ldap://'+ds.getServerName()},
                     {'name':'empty', 'type':'empty'}]
             try:
                 ldapconf.changeConf("/etc/ldap.conf", opts)
             except Exception, e:
-                print "Configuration failed: " + str(e)
+                print "Adding hardcoded server name to /etc/ldap.conf failed: " + str(e)
                 return 1
 
     #Modify pam to add pam_krb5
@@ -278,6 +267,17 @@ def main():
     return 0
 
 try:
+    import sys
+
+    import krbV
+    import socket
+    import logging
+    from optparse import OptionParser
+    import ipaclient.ipadiscovery
+    import ipaclient.ipachangeconf
+    import ipaclient.ntpconf
+    from ipa.ipautil import run
+
     sys.exit(main())
 except KeyboardInterrupt:
     sys.exit(1)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]