What you want is unclear.
Do you want the user's rc file to be read instead of the global one?
In such a case, the user could just set the: MODULERCFILE variable (to an empty path like /nonexistant/).
Below is an explanation of what should be the current behavior
(note - in all cases the rc files must be valid module files - that is, begin with the module magic cookie line):
From: man module (for version 5.0.1 - paths may be different than in your setup - read your "man module"):
Upon invocation of modulecmd.tcl module run-command files are sourced
in the following order:
1. Global RC file as specified by MODULERCFILE variable or
/stage/site/modules/5.0.1/etc/rc. If MODULERCFILE points to a direc-
tory, the modulerc file in this directory is used as global RC file.
2. User specific module RC file $HOME/.modulerc
3. All .modulerc and .version files found during modulefile seeking.
And "man module" from 4.7.1 (again - your paths are probably different):
Upon invocation of modulecmd.tcl module run-command files are sourced
in the following order:
1. Global RC file as specified by MODULERCFILE variable or
/stage/site/modules/4.7.1/etc/rc. If MODULERCFILE points to a
directory, the modulerc file in this directory is used as global RC
file.
2. User specific module RC file $HOME/.modulerc
3. All .modulerc and .version files found during modulefile seeking.
On 2022-01-19 10:35 AM, sup...@cc... wrote:
> Dear Modules guys,
>
> We have installed Modules 4.7.1 on our compute cluster, and we provide it to our users.
>
> We have set up a specific configuration using a system 'initrc' (i.e. the '/etc/environment-modules/initrc').
>
> We have found out that this initrc configuration can be fully overwritten by a user '$HOME/.modulerc' if it exists. We would rather want the user's configuration (i.e. '.modulerc') to be added to the default existing configuration, i.e. from the 'initrc' file.
>
> How to ensure that the user's configuration overloads the default one?
>
> Thank you in advance,
>
> Best regards,
>
> Sébastien
>
>
>
>
> _______________________________________________
> 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/
--------------------------------------------------------
|