@@ -747,7 +747,11 @@ declare -a EESSI_FUSE_MOUNTS=()
747747# mount cvmfs-config repo (to get access to EESSI repositories such as software.eessi.io) unless env var
748748# EESSI_DO_NOT_MOUNT_CVMFS_CONFIG_CERN_CH is defined
749749if [ -z ${EESSI_DO_NOT_MOUNT_CVMFS_CONFIG_CERN_CH+x} ]; then
750- EESSI_FUSE_MOUNTS+=(" --fusemount" " container:cvmfs2 cvmfs-config.cern.ch /cvmfs/cvmfs-config.cern.ch" )
750+ if [[ -x $( command -v cvmfs_config) ]] && cvmfs_config probe cvmfs-config.cern.ch >& /dev/null; then
751+ BIND_PATHS=" ${BIND_PATHS} ,/cvmfs/cvmfs-config.cern.ch"
752+ else
753+ EESSI_FUSE_MOUNTS+=(" --fusemount" " container:cvmfs2 cvmfs-config.cern.ch /cvmfs/cvmfs-config.cern.ch" )
754+ fi
751755fi
752756
753757
758762 [[ ${VERBOSE} -eq 1 ]] && echo " add fusemount options for CVMFS repo '${cvmfs_repo} '"
759763 # split into name, access mode, and mount mode
760764 readarray -td, cvmfs_repo_args <<< " $cvmfs_repo"
761- cvmfs_repo_name=${cvmfs_repo_args[0]}
765+ cvmfs_repo_name=$( sed -e ' s/\\n//g ' <<< " $ {cvmfs_repo_args[0]}" )
762766 cvmfs_repo_access=" ${ACCESS} " # initialize to the default access mode
763767 for arg in ${cvmfs_repo_args[@]: 1} ; do
764768 if [[ $arg == " access=" * ]]; then
773777 fi
774778 fi
775779 done
780+
781+ # obtain cvmfs_repo_name from EESSI_REPOS_CFG_FILE if cvmfs_repo is in cfg_cvmfs_repos
782+ if [[ ${cfg_cvmfs_repos[${cvmfs_repo_name}]} ]]; then
783+ [[ ${VERBOSE} -eq 1 ]] && echo " repo '${cvmfs_repo_name} ' is not an EESSI CVMFS repository..."
784+ # cvmfs_repo_name is actually a repository ID, use that to obtain
785+ # the actual name from the EESSI_REPOS_CFG_FILE
786+ cfg_repo_id=${cvmfs_repo_name}
787+ echo " bob $cfg_repo_id "
788+ cvmfs_repo_name=$( cfg_get_value ${cfg_repo_id} " repo_name" )
789+ echo $cvmfs_repo_name
790+ fi
791+ # remove project subdir in container
792+ cvmfs_repo_name=${cvmfs_repo_name% " /${EESSI_DEV_PROJECT} " }
793+
776794 # if a mount mode was not specified, we use a bind mount if the repository is available on the host,
777795 # and otherwise we use a fuse mount
778796 if [[ -z ${cvmfs_repo_mount} ]]; then
790808 fi
791809 fi
792810
793- # obtain cvmfs_repo_name from EESSI_REPOS_CFG_FILE if cvmfs_repo is in cfg_cvmfs_repos
794- if [[ ${cfg_cvmfs_repos[${cvmfs_repo_name}]} ]]; then
795- [[ ${VERBOSE} -eq 1 ]] && echo " repo '${cvmfs_repo_name} ' is not an EESSI CVMFS repository..."
796- # cvmfs_repo_name is actually a repository ID, use that to obtain
797- # the actual name from the EESSI_REPOS_CFG_FILE
798- cfg_repo_id=${cvmfs_repo_name}
799- cvmfs_repo_name=$( cfg_get_value ${cfg_repo_id} " repo_name" )
800- fi
801- # remove project subdir in container
802- cvmfs_repo_name=${cvmfs_repo_name% " /${EESSI_DEV_PROJECT} " }
803-
804811 # always create a directory for the repository (e.g., to store settings, ...)
805812 mkdir -p ${EESSI_TMPDIR} /${cvmfs_repo_name}
806813
0 commit comments