############################################################################## # # NAME : config_bdii_top_uncert_endpoints # # DESCRIPTION : This function configures the uncertified endpoints list generator # # AUTHORS : Ievgen.Sliusar@cern.ch # # NOTES : Part of custom node type BDII_top_uncert # # YAIM MODULE: glite-yaim-bdii-top-uncert # ############################################################################## config_bdii_top_uncert_endpoints_check () { requires $1 BDII_TOP_UNCERT_NGI } config_bdii_top_uncert_endpoints () { CONF_GIUE=/etc/glite/glite-info-update-endpoints.conf CONF_FLEX=/etc/glite/glite-info-update-endpoints-flexible.conf if [ ! -f ${CONF_GIUE} ]; then yaimlog ERROR "No glite-info-update-endpoints.conf file found" return 1 fi CONF_SUFF=".yaimbkp_`date +%y%m%d_%H%M%S`" mv -f "$CONF_GIUE" "$CONF_GIUE$CONF_SUFF" [ -f ${CONF_FLEX} ] && mv -f "$CONF_FLEX" "$CONF_FLEX$CONF_SUFF" BDII_TOP_UNCERT_CERT_STATUS=${BDII_TOP_UNCERT_CERT_STATUS:-Uncertified} PROD_STATUS_LINE="${BDII_TOP_UNCERT_PROD_STATUS:+PROD_STATUS=}$BDII_TOP_UNCERT_PROD_STATUS" echo -e "EGI_ROC=$BDII_TOP_UNCERT_NGI\nCERT_STATUS=$BDII_TOP_UNCERT_CERT_STATUS\n${PROD_STATUS_LINE}" > $CONF_FLEX touch /var/cache/glite/glite-info-update-endpoints-flexible/flexible.out cat "$CONF_GIUE$CONF_SUFF" | \ sed -e 's@^manual =.*@manual = True@' | \ sed -e 's@^manual_file = .*@manual_file = /var/cache/glite/glite-info-update-endpoints-flexible/flexible.out@' \ > "$CONF_GIUE" }