Skip to content

Commit 7546e90

Browse files
committed
add check for bind mounts
1 parent 706af7b commit 7546e90

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

eessi_container.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,13 @@ do
782782
fi
783783
fi
784784
[[ ${VERBOSE} -eq 1 ]] && echo "Using a ${cvmfs_repo_mount} mount for /cvmfs/${cvmfs_repo_name}"
785+
# if a bind mount was requested, check if the repository is really available on the host
786+
if [[ ${cvmfs_repo_mount} == "bind" ]]; then
787+
if [[ ! -x $(command -v cvmfs_config) ]] || ! cvmfs_config probe ${cvmfs_repo_name} >& /dev/null; then
788+
echo -e "ERROR: bind mount requested for CVMFS repository\n '${cvmfs_repo_name}', but it cannot be probed on the host"
789+
exit ${REPOSITORY_ERROR_EXITCODE}
790+
fi
791+
fi
785792

786793
# obtain cvmfs_repo_name from EESSI_REPOS_CFG_FILE if cvmfs_repo is in cfg_cvmfs_repos
787794
if [[ ${cfg_cvmfs_repos[${cvmfs_repo_name}]} ]]; then

0 commit comments

Comments
 (0)