Hi Jason,
Would it be an option to have .modules.$DISTRO files in the user’s home directories and during module initialization create a softlink .modules --> .modules.$DISTRO? It should be possible to write Tcl code (called from the common initialization files initrc/modulerc) to implement that.
Regards,
Martin
From: Jason Edgecombe <jwe...@un...>
Sent: Donnerstag, 2. Juni 2022 16:39
To: Environment Modules usage and discussion. <mod...@li...>
Subject: Re: [Modules] [EXTERNAL] Re: modules on different Linux distros with shared NFS home directories
Sie erhalten nicht oft eine E-Mail von jwe...@un...<mailto:jwe...@un...>. Erfahren Sie, warum dies wichtig ist<https://aka.ms/LearnAboutSenderIdentification>
[---EXTERNAL---]
Thanks Pierre,
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.
Thanks,
Jason
---------------------------------------------------------------------------
Jason Edgecombe | Linux Administrator
UNC Charlotte | Office of OneIT
9201 University City Blvd. | Charlotte, NC 28223-0001
Phone: 704-687-1943<tel:704-687-1943>
jwe...@un...<mailto:jwe...@un...> | oneit.charlotte.edu<https://oneit.charlotte.edu>
---------------------------------------------------------------------------
If you are not the intended recipient of this transmission or a person responsible for delivering it to the intended recipient, any disclosure, copying, distribution, or other use of any of the information in this transmission is strictly prohibited. If you have received this transmission in error, please notify me immediately by reply e-mail or by telephone at
704-687-1943<tel:704-687-1943>. Thank you.
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
|