If there is that much of difference in your setups (where UBUNTU and Redhat can't share the same modules). You may want to consider changing your home directory setup.
So the home directory for each distro is under the user's main home directory.
For instance - if you home directories are mounted as /nethome/$USER
Then on Redhat the User's home could be /nethome/$USER/Redhat, and On Ubuntu /nethome/$USER/Ubuntu
(then you would achieve complete independence of OSes.
(you might want to look at using the lsb-release command to get that info, example: lsb-release -si ).
However, I think you might be better off exploring how to make your modules adapt to the OS the user is logged into.
On 2022-06-02 09:38 AM, Jason Edgecombe wrote:
> 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
> jwe...@un... | 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. Thank you.
>
>
> On Thu, Jun 2, 2022 at 10:18 AM Pierre Girard <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...>
>> *Envoyé :* 2 juin 2022 09:34
>> *À :* 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...
>> https://lists.sourceforge.net/lists/listinfo/modules-interest
>>
>
>
>
> _______________________________________________
> Modules-interest mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/modules-interest
>
--
--------------------------------------------------------
The views and opinions expressed above are strictly
those of the author(s). The content of this message has
not been reviewed nor approved by any entity whatsoever.
--------------------------------------------------------
Paul FM Info: http://paulfm.com/~paulfm/
--------------------------------------------------------
|