De : Jason Edgecombe <jwe...@un...>
I just realized that I didn't explain my problem very well. I'm looking for how to split each user's automatically-loaded modules for each OS. In other words, if I run "module initadd foo" on Ubuntu then the foo module will be automatically loaded on Ubuntu, but not RHEL.
So if I understand correctly, you have 2 sets of modules that differ depending on the OS. So having module load foo in the configuration file would work on ubuntu and an error on RHEL or something along those lines.
Maybe write the module itself so it adjusts to the platform you’re on? Something like this:
switch $env(DISTRO) {
ubuntu {
# do something
}
rhel {
# do something else
}
default {
# unknown system
}
}
On Thu, Jun 2, 2022 at 10:18 AM Pierre Girard <pie...@ge...<mailto:pie...@ge...>> wrote:
[Caution: Email from External Sender. Do not click or open links or attachments unless you know this sender.]
De : Jason Edgecombe <jwe...@un...<mailto:jwe...@un...>>
Envoyé : 2 juin 2022 09:34
À : mod...@li...<mailto:mod...@li...>
Objet : [Modules] modules on different Linux distros with shared NFS home directories
I want to start using modules in our Linux environment. I support both RHEL and Ubuntu machines that use the same shared NFS path for each user's home directory. Is there a way for me to override the ~/.modules path to make it something like ~/.modules-$DISTRO ? I would prefer to not modify the core modulecmd.tcl file. I tried using trace commands in my site config, but I can't seem to trace the cmdModuleInit procedure to override things.
You should be able to change MODULEPATH environment variable.
export MODULEPATH=~/modulefiles:/home/modules/modulefiles-$DISTRO
_______________________________________________
Modules-interest mailing list
Mod...@li...<mailto:Mod...@li...>
https://lists.sourceforge.net/lists/listinfo/modules-interest
|