From 46d94cd659946f586e1871e46cb73a516257b724 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Mon, 18 Jan 2010 14:22:04 +0000 Subject: [PATCH] Overwrite LB-super-users file by $GLITE_LB_SUPER_USERS (deleting old super-users file content). --- org.glite.yaim.lb/config/functions/config_glite_lb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/org.glite.yaim.lb/config/functions/config_glite_lb b/org.glite.yaim.lb/config/functions/config_glite_lb index 637a487..01127c8 100644 --- a/org.glite.yaim.lb/config/functions/config_glite_lb +++ b/org.glite.yaim.lb/config/functions/config_glite_lb @@ -16,8 +16,8 @@ function config_glite_lb_setenv(){ yaimgridenv_set GLITE_LB_EXPORT_PURGE_ARGS "${GLITE_LB_EXPORT_PURGE_ARGS:---cleared 2d --aborted 15d --cancelled 15d --other 60d}" yaimgridenv_set GLITE_LB_EXPORT_JPPS ${GLITE_LB_EXPORT_JPPS:-} yaimgridenv_set GLITE_LB_RTM_ENABLED ${GLITE_LB_RTM_ENABLED:-false} - yaimgridenv_set GLITE_LB_RTM_DN ${GLITE_LB_RTM_DN:-/C=UK/O=eScience/OU=Imperial/L=Physics/CN=heppc24.hep.ph.ic.ac.uk/Email=janusz.martyniak@imperial.ac.uk} - yaimgridenv_set GLITE_LB_SUPER_USERS ${GLITE_LB_SUPER_USERS:-} + yaimgridenv_set GLITE_LB_RTM_DN "${GLITE_LB_RTM_DN:-/C=UK/O=eScience/OU=Imperial/L=Physics/CN=heppc24.hep.ph.ic.ac.uk/Email=janusz.martyniak@imperial.ac.uk}" + yaimgridenv_set GLITE_LB_SUPER_USERS "${GLITE_LB_SUPER_USERS:-}" yaimgridenv_set GLITE_LB_HARVESTER_ENABLED ${GLITE_LB_HARVESTER_ENABLED:-false} yaimgridenv_set GLITE_LB_HARVESTER_MSG_OPTIONS "${GLITE_LB_HARVESTER_MSG_OPTIONS:---wlcg}" @@ -173,14 +173,14 @@ EOF echo "${GLITE_LOCATION}/etc/init.d/glite-lb-bkserverd" >> ${GLITE_LOCATION}/etc/gLiteservices fi - touch ${GLITE_LOCATION}/etc/LB-super-users - echo "$GLITE_LB_SUPER_USERS" > ${GLITE_LOCATION}/etc/LB-super-users.add + if [ -z "$GLITE_LB_SUPER_USERS" ]; then + touch ${GLITE_LOCATION}/etc/LB-super-users + else + echo "$GLITE_LB_SUPER_USERS" > ${GLITE_LOCATION}/etc/LB-super-users + fi if [ x"$GLITE_LB_RTM_ENABLED" = x"true" ]; then - echo "$GLITE_LB_RTM_DN" >> ${GLITE_LOCATION}/etc/LB-super-users.add + echo "$GLITE_LB_RTM_DN" >> ${GLITE_LOCATION}/etc/LB-super-users fi - mv ${GLITE_LOCATION}/etc/LB-super-users ${GLITE_LOCATION}/etc/LB-super-users.prev - cat ${GLITE_LOCATION}/etc/LB-super-users.prev ${GLITE_LOCATION}/etc/LB-super-users.add | sort | uniq > ${GLITE_LOCATION}/etc/LB-super-users - rm ${GLITE_LOCATION}/etc/LB-super-users.prev ${GLITE_LOCATION}/etc/LB-super-users.add if [ ! -f ${GLITE_LOCATION}/etc/glite-lb-harvester.conf ]; then echo $HOSTNAME > ${GLITE_LOCATION}/etc/glite-lb-harvester.conf -- 1.8.2.3