Skip to content

Commit 83939af

Browse files
committed
add option for disabling all CVMFS fuse mounts in the container
1 parent 5f36708 commit 83939af

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

eessi_container.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ display_help() {
9898
echo " -r | --repository CFG - configuration file or identifier defining the"
9999
echo " repository to use; can be given multiple times;"
100100
echo " CFG may include suffixes ',access={ro,rw},mode={bind,fuse}' to"
101-
echo " overwrite the global access and/or mount mode for this repository"
101+
echo " overwrite the global access and/or mount mode for this repository;"
102+
echo " use 'None' to not mount any repositories"
102103
echo " [default: software.eessi.io via CVMFS config available"
103104
echo " via default container, see --container]"
104105
echo " -u | --resume DIR/TGZ - resume a previous run from a directory or tarball,"
@@ -285,6 +286,14 @@ if [[ ${#REPOSITORIES[@]} -eq 0 ]]; then
285286
REPOSITORIES+=(${eessi_default_cvmfs_repo})
286287
fi
287288

289+
# if the first element of REPOSITORIES is "none" (case-insensitive),
290+
# make sure it is an empty list from here on, i.e. no repositories will be mounted
291+
if [[ ${REPOSITORIES[0],,} == "none" ]]; then
292+
REPOSITORIES=()
293+
# also prevent the cvmfs-config repo from being mounted
294+
EESSI_DO_NOT_MOUNT_CVMFS_CONFIG_CERN_CH=1
295+
fi
296+
288297
# 1. check if argument values are valid
289298
# (arg -a|--access) check if ACCESS is supported
290299
# use the value as global setting, suffix to --repository can specify an access mode per repository

0 commit comments

Comments
 (0)