Closed e4t closed 1 year ago
Thanks for reporting this issue and the patch (Issue #621). Your patch might solve your issue but it doesn't always pick the right shell. A zsh user would instead be a bash user. Not the end of the world but it matters in a few cases.
For various reasons, I have moved the determination of the "shell" into Lmod itself. Please test Lmod version 8.7.17 to see if it fixes your issue as well. Thanks!
Thanks for picking up my patch so quickly and looking into it!
I did test zsh and ksh and didn't see any issues - ie. LMOD_SHELL_PRGM
was set to the correct shell after calling module
.
Version 8.7.17 works well. Moving shell detection into the Lmod seems to be a good solution.
Thank you!
Great! I'm glad that works for you. Closing this issue
Describe the bug Since updating Lmod to a version >= 8.7.5 on openSUSE Tumbleweed we get error messages when running unrelated shell scripts which have certain access restrictions enforced - such as under apparmor.
To Reproduce Steps to reproduce the behavior:
less
/usr/share/lmod/8.7.15/init/csh`This will cause
to be written to stderr.
Expected behavior A clear and concise description of what you expected to happen.
Desktop:
Additional context The problem is triggered when
/usr/bin/lessopen.sh
is executed. This script has certain apparmor restrictions set. Since the Lmod init script setsBASH_ENV
to/usr/share/lmod/8.7.15/init/bash
, this script is run every time a shell script is executed.A possible solution would be to reduce the 'access surface' of
init/bash
when sourced by delaying determiningLMOD_SHELL_PRGM
untilmodule
is called for the first time.