From e2852573aa89551975f4bcb29b47d0bae51c343d Mon Sep 17 00:00:00 2001 From: Robert Harakaly Date: Fri, 10 Dec 2004 11:25:52 +0000 Subject: [PATCH] Taking off the lb.certificate/key.file and necessary fixes --- .../config/scripts/glite-lb-config.py | 20 +++++++++++++------- .../config/templates/glite-lb.cfg.xml | 16 ++-------------- 2 files changed, 15 insertions(+), 21 deletions(-) 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 e4c355c..d6f2af6 100644 --- a/org.glite.deployment.lb/config/scripts/glite-lb-config.py +++ b/org.glite.deployment.lb/config/scripts/glite-lb-config.py @@ -127,10 +127,15 @@ python %s-config [OPTION...]""" % (self.name, os.environ['GLITE_LOCATION'], \ (uid,gid) = glib.get_user_info(params['GLITE_USER']) glib.check_dir(os.environ['GLITE_LOCATION_VAR'],0755, uid, gid) glib.check_dir("/home/%s/.certs" % params['GLITE_USER'],0755, uid, gid) + lb_cert_path = pwd.getpwnam(params['GLITE_USER'])[5] + "/" + params['user.certificate.path'] + # Copy certificates - os.system("cp %s %s ~%s/.certs/" % (params['host.certificate.file'], params['host.key.file'], params['GLITE_USER'])) - os.chown(params['lb.certificate.file'], uid,gid) - os.chown(params['lb.key.file'],uid,gid) + glib.check_dir( lb_cert_path, 0755, uid, gid) + os.system("cp %s %s %s/" % (params['host.certificate.file'], params['host.key.file'], lb_cert_path)) + os.chown("%s/hostcert.pem" % lb_cert_path, uid,gid) + os.chown("%s/hostkey.pem" % lb_cert_path, uid,gid) + glib.export('GLITE_HOST_CERT',"%s/hostcert.pem" % lb_cert_path) + glib.export('GLITE_HOST_KEY',"%s/hostkey.pem" % lb_cert_path) # Create the MySQL database self.mysql.stop() @@ -176,11 +181,12 @@ def set_env(): if not os.path.exists(os.environ['GLITE_LOCATION_TMP']): os.mkdir(os.environ['GLITE_LOCATION_TMP'],0755) - glib.export('GLITE_HOST_CERT',params['lb.certificate.file']) - glib.export('GLITE_HOST_KEY',params['lb.key.file']) - glib.export('GLITE_USER','gproduct') + (uid,gid) = glib.add_user(params['GLITE_USER']) + lb_cert_path = pwd.getpwnam(params['GLITE_USER'])[5] + "/" + params['user.certificate.path'] + glib.export('GLITE_HOST_CERT',"%s/hostcert.pem" % lb_cert_path) + glib.export('GLITE_HOST_KEY',"%s/hostkey.pem" % lb_cert_path) glib.export('GLOBUS_LOCATION',params['GLOBUS_LOCATION']) - glib.export('GLITE_CERT_DIR',params['GLITE_CERT_DIR']) + glib.export('GLITE_CERT_DIR',params['ca.certificates.dir']) # bin and lib paths glib.addEnvPath("PATH","/usr/bin/:%s/bin:%s/externals/bin:%s/bin" % (os.environ['GLOBUS_LOCATION'],os.environ['GLITE_LOCATION'],os.environ['GLITE_LOCATION'])) 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 9297a3d..44a7dad 100644 --- a/org.glite.deployment.lb/config/templates/glite-lb.cfg.xml +++ b/org.glite.deployment.lb/config/templates/glite-lb.cfg.xml @@ -37,22 +37,10 @@ - - - + - - - - - + \ No newline at end of file -- 1.8.2.3