Re: [Lmod-users] Hooking lmod methods
A Lua based environment module system that reads TCL modulefiles.
Brought to you by:
rtmclay
|
From: Ward P. <wpo...@gm...> - 2026-02-05 20:08:10
|
On Thu, Feb 5, 2026 at 8:04 PM Ward Poelmans <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
|