garlic tool: ensure the mountpoint is enabled

This commit is contained in:
Rodrigo Arias Mallo 2021-02-15 16:18:21 +01:00
parent c36b724e9a
commit d51fe5db48

View File

@ -76,6 +76,14 @@ checkExperiment() {
return 0
}
checkMountpoint() {
if [ ! -e "$garlicPrefix/garlic.control" ]; then
>&2 echo "error: missing $garlicPrefix/garlic.control"
>&2 echo "Is the mountpoint enabled?"
exit 1
fi
}
do_fetch() {
expName=$(basename $experiment)
user=$(ssh -G "$sshHost" | awk '/^user /{print $2}')
@ -184,6 +192,8 @@ if [ -z "$trebuchet" ]; then
usage
fi
checkMountpoint
checkTrebuchet $trebuchet
experiment=$(findExperiment "$trebuchet")