From a170c31cb336a5a37b126256b1f2348a74914a72 Mon Sep 17 00:00:00 2001 From: Alberto Di Meglio Date: Tue, 13 Sep 2005 21:04:24 +0000 Subject: [PATCH] Use standard mysql module functions to create db --- org.glite.deployment.lb/CHANGELOG | 3 +++ org.glite.deployment.lb/config/scripts/glite-lb-config.py | 13 ++++++------- org.glite.deployment.lb/project/version.properties | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/org.glite.deployment.lb/CHANGELOG b/org.glite.deployment.lb/CHANGELOG index 9a4d20d..32a02b4 100644 --- a/org.glite.deployment.lb/CHANGELOG +++ b/org.glite.deployment.lb/CHANGELOG @@ -1,3 +1,6 @@ +DATE: 13-09-2005 23:00 +[dimeglio] Use standard mysql module functions to create db + DATE: 08-07-2005 15:20 [dimeglio] Increased major version because of interface changes in the config scripts diff --git a/org.glite.deployment.lb/config/scripts/glite-lb-config.py b/org.glite.deployment.lb/config/scripts/glite-lb-config.py index 29b5939..2151f54 100644 --- a/org.glite.deployment.lb/config/scripts/glite-lb-config.py +++ b/org.glite.deployment.lb/config/scripts/glite-lb-config.py @@ -6,7 +6,7 @@ # For license conditions see the license file or http://eu-egee.org/license.html # ################################################################################ -# glite-lb-config v. 2.0.1 +# glite-lb-config v. 2.0.2 # # Post-installation script for configuring the gLite Logging and Bookkeping Server # Robert Harakaly < robert.harakaly@cern.ch > @@ -46,7 +46,7 @@ class glite_lb: def __init__(self): self.mysql = MySQL.Mysql() self.verbose = 0 - self.version = "2.0.1" + self.version = "2.0.2" self.name = "glite-lb" self.friendly_name = "gLite Logging and Bookkeeping" params['module.version'] = self.version @@ -281,11 +281,10 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \ os.remove('/tmp/mysql_ct') file = open('/tmp/mysql_ct', 'w') - text = ['CREATE DATABASE %s;\n' % params['lb.database.name'], - 'GRANT ALL PRIVILEGES ON %s.* TO %s@localhost IDENTIFIED BY "";\n' \ - % (params['lb.database.name'],params['lb.database.username']), - 'USE %s;\n' % params['lb.database.name'], - '\. %s/etc/glite-lb-dbsetup.sql\n' % os.environ['GLITE_LOCATION']] + + self.mysql.add_user(params['lb.database.name'],params['lb.database.username'],"",mysql_root_password) + text = ['USE %s;\n' % params['lb.database.name'], + '\. %s/etc/glite-lb-dbsetup.sql\n' % os.environ['GLITE_LOCATION']] file.writelines(text) file.close() diff --git a/org.glite.deployment.lb/project/version.properties b/org.glite.deployment.lb/project/version.properties index a7c9c63..9a0479a 100644 --- a/org.glite.deployment.lb/project/version.properties +++ b/org.glite.deployment.lb/project/version.properties @@ -1,4 +1,4 @@ -module.version = 2.0.1 +module.version = 2.0.2 module.age = 1 \ No newline at end of file -- 1.8.2.3