diff --git a/SubSystems/Dragnet/scripts/LOFAR-Dragnet-activate.sh b/SubSystems/Dragnet/scripts/LOFAR-Dragnet-activate.sh index 96a4013ed0b7d1f6f2b5167b6abd2f7d59039392..522fb302a35db58270b024ab5b863831198cbe8f 100755 --- a/SubSystems/Dragnet/scripts/LOFAR-Dragnet-activate.sh +++ b/SubSystems/Dragnet/scripts/LOFAR-Dragnet-activate.sh @@ -31,6 +31,15 @@ lofar_versions_root=/opt/lofar_versions prefix=$lofar_versions_root/$lofar_release nodelist="dragnet dragproc $(seq -s ' ' -f drg%02g 1 23)" +# basic sanity check on selected release name +if [ ! -e "$lofar_versions_root/$lofar_release/lofarinit.sh" ]; then + echo "Error: selected release is not installed: missing $lofar_versions_root/$lofar_release/lofarinit.sh" + exit 1 +elif [ "$lofar_release" == current ]; then + echo "Error: 'current' itself is not an acceptable release name to activate, as it refers to the active release" + exit 1 +fi + # repoint 'current' symlink to release version atomically (using mv -T) # pray it works on every node, else the cluster's LOFAR install ends up in limbo... declare -a status_arr3