From 84cd0bdbb007fb9d9d293cf9b7b8c1aef3629b00 Mon Sep 17 00:00:00 2001 From: Alberto Di Meglio Date: Tue, 11 Oct 2005 22:15:36 +0000 Subject: [PATCH] Use checkMySQLConfiguration function to check root password --- org.glite.deployment.lb/CHANGELOG | 3 +++ .../config/scripts/glite-lb-config.py | 20 +++++++++++++------- .../config/templates/glite-lb.cfg.xml | 8 ++++++++ org.glite.deployment.lb/project/version.properties | 2 +- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/org.glite.deployment.lb/CHANGELOG b/org.glite.deployment.lb/CHANGELOG index 32a02b4..8282547 100644 --- a/org.glite.deployment.lb/CHANGELOG +++ b/org.glite.deployment.lb/CHANGELOG @@ -1,3 +1,6 @@ +DATE: 12-10-2005 00:15 +[dimeglio] Use checkMySQLConfiguration function to check root password + DATE: 13-09-2005 23:00 [dimeglio] Use standard mysql module functions to create db 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 699a4d8..ff6ab42 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.3 +# glite-lb-config v. 2.0.4 # # 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.3" + self.version = "2.0.4" self.name = "glite-lb" self.friendly_name = "gLite Logging and Bookkeeping" params['module.version'] = self.version @@ -264,11 +264,17 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \ if not os.path.exists('/tmp/mysql.sock'): os.symlink('/var/lib/mysql/mysql.sock', '/tmp/mysql.sock') - # Set root password - mysql_root_password = params['mysql.root.password'] - if mysql_root_password != "": - self.mysql.setpassword(mysql_root_password) - + # ------------------------------------------------------------ + # Check password of MySQL + # ------------------------------------------------------------ + + self.mysql_root_password = params['mysql.root.password'] + if not params.has_key('set.mysql.root.password'): + params['set.mysql.root.password'] = 'false' + setempty = params['set.mysql.root.password'] + if self.mysql.checkMySQLConfiguration(self.mysql_root_password,setempty): + return 1 + # Create the MySQL database print "\nCreate/Verify the %s database" % params['lb.database.name'] diff --git a/org.glite.deployment.lb/config/templates/glite-lb.cfg.xml b/org.glite.deployment.lb/config/templates/glite-lb.cfg.xml index 72ada69..97995a8 100644 --- a/org.glite.deployment.lb/config/templates/glite-lb.cfg.xml +++ b/org.glite.deployment.lb/config/templates/glite-lb.cfg.xml @@ -34,6 +34,14 @@ description="Enable check of host certificates" value="true"/> + + + diff --git a/org.glite.deployment.lb/project/version.properties b/org.glite.deployment.lb/project/version.properties index a8dd386..6658ae7 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.3 +module.version = 2.0.4 module.age = 1 \ No newline at end of file -- 1.8.2.3