##############################################################################
# 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_ldconf
#
# DESCRIPTION : This function configures ldconf.
#
# AUTHORS :     Gergely.Debreczeni@cern.ch
#               Robert.Harakaly@cern.ch
#
# NOTES :
#
# YAIM MODULE:  glite-yaim-core
#
##############################################################################

config_ldconf () {

  FUNCTION="config_ldconf"
  yaimlog INFO "${FUNCTION}: function not needed anymore, left empy waiting to be removed"
  
  # Exit with success
  return 0    

####@ Saves /etc/ld.so.conf to /etc/ld.so.conf.orig    

#cp -p /etc/ld.so.conf /etc/ld.so.conf.orig

####@ Adds a set of default libdirs to /etc/ld.so.conf

#    LIBDIRS="${INSTALL_ROOT}/globus/lib \
#	     /usr/local/lib \
#             ${INSTALL_ROOT}/lcg/lib \
#             ${INSTALL_ROOT}/lcg/lib64 \
#             /usr/kerberos/lib \
#             /usr/X11R6/lib \
#             /usr/lib/qt-3.1/lib \
#             ${ORACLE_LOCATION}/client/lib \
#             ${INSTALL_ROOT}/glite/lib \
#             ${INSTALL_ROOT}/glite/lib64 \
#             ${INSTALL_ROOT}/classads/lib \
#             ${INSTALL_ROOT}/classads/lib64" 

    
#    if [ -f /etc/ld.so.conf.add ]; then
#	rm -f /etc/ld.so.conf.add
#    fi

#    for libdir in ${LIBDIRS}; do 
#	if  ( ! grep -q $libdir /etc/ld.so.conf && [ -d $libdir ] ); then
#	    echo $libdir >> /etc/ld.so.conf.add
#	fi
#    done

#    if [ -f /etc/ld.so.conf.add ]; then    
#	sort -u /etc/ld.so.conf.add >> /etc/ld.so.conf  
#	rm -f  /etc/ld.so.conf.add
#    fi

####@ Runs /sbin/ldconfig

#    /sbin/ldconfig

#    return 0
}

