Update: config_gip_px performs cleaning tasks to remove existing ldif files.
authorMaria Alandes Pradillo <Maria.Alandes.Pradillo@cern.ch>
Tue, 12 Feb 2008 09:13:26 +0000 (09:13 +0000)
committerMaria Alandes Pradillo <Maria.Alandes.Pradillo@cern.ch>
Tue, 12 Feb 2008 09:13:26 +0000 (09:13 +0000)
org.glite.yaim.myproxy/config/functions/config_gip_px
org.glite.yaim.myproxy/config/functions/config_info_service_px

index 94e81ae..e7f49e8 100755 (executable)
 #
 # AUTHORS :     Shu-Ting.Liao@cern.ch
 #               
-# NOTES :       The config_gip_<node_type> functions are part of the glite 3.1
-#               information system configuration
+# NOTES :       The config_gip_<node_type> function creates the ldif file. 
+#               This is currently done by the function config_info_service_<node_type>.
+#               This function is still included in the function list for cleaning tasks. 
+#               
 #
 # YAIM MODULE:  glite-yaim-myproxy
 #
 ##############################################################################
 config_gip_px_check () {
-       requires $1 GRID_TRUSTED_BROKERS SITE_EMAIL SITE_NAME INSTALL_ROOT
+   yaimlog DEBUG "This function currently doesn't set any environment variables."
 }
 
 config_gip_px_setenv () {
-       yaimlog DEBUG "This function currently doesn't set any environment variables."
+   yaimlog DEBUG "This function currently doesn't set any environment variables."
 }
 
 config_gip_px () {
 
-       ### Auxiliary parameters
-       STATIC_CREATE="${INSTALL_ROOT}/glite/sbin/glite-info-static-create"
-        TEMPLATE_DIR="${INSTALL_ROOT}/glite/etc"
-        CONF_DIR="$INSTALL_ROOT/glite/var/tmp/gip"
-        LDIF_DIR="${INSTALL_ROOT}/glite/etc/gip/ldif"
-
-until [ "$GIP_RESPONSE" -ge 0 ]; do
-    echo "ERROR: bad GIP_RESPONSE: $GIP_RESPONSE"
-    exit 1
-done
-
-
-#### Define output file
-
-if ( echo "${NODE_TYPE_LIST}" | grep -w PX > /dev/null ); then
-
-outfile=${CONF_DIR}/glite-info-static-px.conf
-
-    cat << EOF > $outfile
-
-dn: GlueServiceUniqueID=${PX_HOST}:7512
-GlueServiceName: ${SITE_NAME}-myproxy
-GlueServiceType: MyProxy
-GlueServiceVersion: 1.1.0
-GlueServiceEndpoint: ${PX_HOST}:7512
-GlueServiceURI: unset
-GlueServiceAccessPointURL: myproxy://${PX_HOST}
-GlueServiceStatus: OK
-GlueServiceStatusInfo: No Problems
-GlueServiceWSDL: unset
-GlueServiceSemantics: unset
-GlueServiceStartTime: 1970-01-01T00:00:00Z
-GlueServiceOwner: LCG
-GlueForeignKey: GlueSiteUniqueID=${SITE_NAME}
-EOF
-
-    split_quoted_variable $GRID_TRUSTED_BROKERS | while read x; do
-        echo "GlueServiceAccessControlRule: $x" >> $outfile
-    done
-       
-       ### Create static information file
-        ldif_file="${LDIF_DIR}/static-file-PX.ldif"
-        ${STATIC_CREATE} -c $outfile -t ${TEMPLATE_DIR}/GlueService.template > ${ldif_file}
-
-fi 
-
-       if [ $? -ne 0 ] ; then
-            yaimlog WARNING "${STATIC_CREATE} returned an error code!"
-        fi
-######
-
-        ### Exit with success
+CONF_DIR="$INSTALL_ROOT/glite/var/tmp/gip"
+LDIF_DIR="${INSTALL_ROOT}/glite/etc/gip/ldif"
 
+rm -rf ${CONF_DIR}/glite-info-static-px.conf
+rm -rf ${LDIF_DIR}/static-file-PX.ldif
 
 return 0
+
 }
index 5115e20..4165984 100644 (file)
@@ -44,8 +44,6 @@ INFO_SERVICE_CONFIG=${INFO_SERVICE_CONFIG:-${INSTALL_ROOT}/glite/etc}
 INFO_PROVIDER_PATH=${INFO_PROVIDER_PATH:-${INSTALL_ROOT}/glite/etc/gip/provider}
 SERVICE=myproxy
 
-rm -rf ${INFO_SERVICE_CONFIG_FILE}
-
 if [ ! -f ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE}.conf.template ]; then
   yaimlog ERROR "The template file for glite-info-service-${SERVICE}.conf.template was not found in ${INFO_SERVICE_CONFIG}."
   exit 1
@@ -56,7 +54,7 @@ if [ ! -f ${INFO_SERVICE_SCRIPT}/glite-info-service ]; then
   exit 1
 fi
 
-rm -rf ${INFO_SERVICE_CONFIG_FILE}
+rm -rf ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE}.conf
 
 grid_trusted_brokers=""
 while read x; do