[Dev OpenGP] [85] Part of the daemon.

[ Thread Index | Date Index | More opengp.tuxfamily.org/development Archives ]


Revision: 85
Author:   alband85
Date:     2009-03-24 17:57:26 +0100 (Tue, 24 Mar 2009)

Log Message:
-----------
Part of the daemon.

Modified Paths:
--------------
    trunk/src/bin/ogpdaemon


Modified: trunk/src/bin/ogpdaemon
===================================================================
--- trunk/src/bin/ogpdaemon	2009-03-24 15:14:31 UTC (rev 84)
+++ trunk/src/bin/ogpdaemon	2009-03-24 16:57:26 UTC (rev 85)
@@ -5,24 +5,27 @@
 from ogp.plugins import *
 
 uri = "ldap://localhost:389";
-userDn = "cn=admin,dc=nodomain"
+userDn = "cn=admin,dc=ogp"
 passwd = "toor"
-dn='ou=test2,ou=test,dc=nodomain'
+dn='cn=mac1,ou=titi,ou=tutu,dc=ogp'
 
 # Connection
 core = OgpCore(uri, userDn, passwd)
 
+
+
 requiredPlugins=core.getRequiredPlugins(dn)
 for pluginName in requiredPlugins:
-	print "Installing conf for plugin '" + pluginName + "'... ",
-	try:
-		pluginClass = Plugin.getPluginFromName(pluginName)
-		pluginInstance = pluginClass(dn)
-		pluginInstance.installConf()
-		print "\033[0;32mOK\033[0m."
-	except KeyError:
-		print "\033[0;31mfailed\033[0m. Plugin '" + pluginName + "' is missing!"
-	except:
-		print "\033[0;31mfailed\033[0m. Something went wrong!"
-	
+	if pluginName != 'ogpdaemon':
+		print "Installing conf for plugin '" + pluginName + "'...",
+		try:
+			pluginClass = Plugin.getPluginFromName(pluginName)
+			pluginInstance = pluginClass(dn)
+			pluginInstance.installConf()
+			print "\033[0;32mOK\033[0m."
+		except KeyError:
+			print "\033[0;31mfailed\033[0m. Plugin '" + pluginName + "' is missing!"
+		except:
+			print "\033[0;31mfailed\033[0m. Something went wrong!"
+		
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/