I would like to enable the EB/Lmod modules to all users in a global bash/tcsh setup script. On CentOS 7.2 initialization is done using scripts in /etc/profile.d/

Basically I want every user shell to execute these commands:

export EASYBUILD_PREFIX=/home/modules
module use $EASYBUILD_PREFIX/modules/all
module load EasyBuild

Question: Can anyone share their /etc/profile.d/ script for EB setup?

Some sanity checks must be performed, among other things the Lmod RPM package has created these scripts:

$ ls -la /etc/profile.d/*mod*
-rw-r--r--. 1 root root 122 May 12 23:57 /etc/profile.d/00-modulepath.csh
-rw-r--r--. 1 root root 113 May 12 23:57 /etc/profile.d/00-modulepath.sh
lrwxrwxrwx. 1 root root 31 Jul 18 15:58 /etc/profile.d/z00_lmod.csh -> /usr/share/lmod/lmod/init/cshrc lrwxrwxrwx. 1 root root 33 Jul 18 15:58 /etc/profile.d/z00_lmod.sh -> /usr/share/lmod/lmod/init/profile

The z00_lmod.* script should be performed prior to the "module" commands.

Thanks for sharing any good ideas.


Reply via email to