Re: [Lmod-users] Hooking lmod methods
A Lua based environment module system that reads TCL modulefiles.
Brought to you by:
rtmclay
|
From: <mal...@ci...> - 2026-02-06 10:15:36
|
Hey,
thanks for your inputs,
I ended up using SitePackage with a sandbox table modification as you hinted. And it works like a charm.
The goal if this SitePackage usage is to workaround some vendor generated modules that dont play well with our site's policy (it append_path in the wrong environment variable). By hooking prepend_path through SitePackage, we avoid module modification.
Cheers,
Etienne
De: "Ward Poelmans" <wpo...@gm...>
À: "lmod-users" <lmo...@li...>
Envoyé: Jeudi 5 Février 2026 21:07:46
Objet: Re: [Lmod-users] Hooking lmod methods
On Thu, Feb 5, 2026 at 8:04 PM Ward Poelmans < [ mailto:wpo...@gm... | wpo...@gm... ] > wrote:
> I'm not sure I understand what you try to achieve but the
> SitePackage.lua is quite reliable. We put it at
> /etc/lmod/SitePackage.lua where it gets picked up by Lmod. We've never
> seen issue with this, no matter how creative the users are.
I missed the crucial bit: the file /etc/lmod/lmod_config.lua is read by Lmod. There you can tell it where to look for SitePackage.lua:
require("strict")
local cosmic = require("Cosmic"):singleton()
cosmic:assign("LMOD_PACKAGE_PATH", "/etc/lmod")
This makes Lmod look into /etc/lmod for the file SitePackage.lua
Ward
_______________________________________________
Lmod-users mailing list
Lmo...@li...
https://lists.sourceforge.net/lists/listinfo/lmod-users
|