@@ -747,7 +747,11 @@ declare -a EESSI_FUSE_MOUNTS=()
747
747
# mount cvmfs-config repo (to get access to EESSI repositories such as software.eessi.io) unless env var
748
748
# EESSI_DO_NOT_MOUNT_CVMFS_CONFIG_CERN_CH is defined
749
749
if [ -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
751
755
fi
752
756
753
757
758
762
[[ ${VERBOSE} -eq 1 ]] && echo " add fusemount options for CVMFS repo '${cvmfs_repo} '"
759
763
# split into name, access mode, and mount mode
760
764
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]}" )
762
766
cvmfs_repo_access=" ${ACCESS} " # initialize to the default access mode
763
767
for arg in ${cvmfs_repo_args[@]: 1} ; do
764
768
if [[ $arg == " access=" * ]]; then
773
777
fi
774
778
fi
775
779
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
+
776
794
# if a mount mode was not specified, we use a bind mount if the repository is available on the host,
777
795
# and otherwise we use a fuse mount
778
796
if [[ -z ${cvmfs_repo_mount} ]]; then
790
808
fi
791
809
fi
792
810
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
-
804
811
# always create a directory for the repository (e.g., to store settings, ...)
805
812
mkdir -p ${EESSI_TMPDIR} /${cvmfs_repo_name}
806
813
0 commit comments