--- /dev/null
+##############################################################################
+# Copyright (c) Members of the EGEE Collaboration. 2004.
+# See http://www.eu-egee.org/partners/ for details on the copyright
+# holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##############################################################################
+#
+# NAME : config_info_service_px
+#
+# DESCRIPTION : This function configures the dynamic service publisher
+# for MyProxy (PX) node.
+#
+# AUTHORS : Maria.Alandes.Pradillo@cern.ch
+#
+# NOTES :
+#
+# YAIM MODULE: glite-yaim-myproxy
+#
+##############################################################################
+
+config_info_service_px_check () {
+ requires $1 GRID_TRUSTED_BROKERS SITE_NAME INSTALL_ROOT
+}
+
+config_info_service_px_setenv () {
+ yaimlog DEBUG "This function currently doesn't set any environment variables."
+}
+
+config_info_service_px () {
+
+INFO_SERVICE_SCRIPT=${INFO_SERVICE_SCRIPT:-${INSTALL_ROOT}/glite/libexec}
+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
+fi
+
+if [ ! -f ${INFO_SERVICE_SCRIPT}/glite-info-service ]; then
+ yaimlog ERROR "The script file for glite-info-service was not found in ${INFO_SERVICE_SCRIPT}."
+ exit 1
+fi
+
+rm -rf ${INFO_SERVICE_CONFIG_FILE}
+
+grid_trusted_brokers=""
+while read x; do
+ grid_trusted_brokers="${x}\\\n${grid_trusted_brokers}"
+done < <(split_quoted_variable $GRID_TRUSTED_BROKERS)
+
+cat ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE}.conf.template | sed \
+ -e "s#^get_acbr =.*#get_acbr = echo -e \"${grid_trusted_brokers}\"#" \
+> ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE}.conf
+
+grep -q glite-info-service-${SERVICE}.conf ${INFO_PROVIDER_PATH}/glite-info-provider-service-wrapper >> /dev/null
+res=$?
+if [ -f ${INFO_PROVIDER_PATH}/glite-info-provider-service-wrapper ]; then
+ if [ $res -eq 1 ]; then
+ cat << EOF > ${INFO_PROVIDER_PATH}/glite-info-provider-service-wrapper
+#!/bin/sh
+export PATH=$PATH:${INFO_SERVICE_SCRIPT}
+${INFO_SERVICE_SCRIPT}/glite-info-service ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE}.conf $SITE_NAME
+EOF
+ chmod +x ${INFO_PROVIDER_PATH}/glite-info-provider-service-wrapper
+ fi
+else
+ cat << EOF > ${INFO_PROVIDER_PATH}/glite-info-provider-service-wrapper
+#!/bin/sh
+export PATH=$PATH:${INFO_SERVICE_SCRIPT}
+${INFO_SERVICE_SCRIPT}/glite-info-service ${INFO_SERVICE_CONFIG}/glite-info-service-${SERVICE}.conf $SITE_NAME
+EOF
+ chmod +x ${INFO_PROVIDER_PATH}/glite-info-provider-service-wrapper
+fi
+
+
+# Exit with success
+return 0
+
+}