Hello list,
I just fixed a problem, which bit one of the users here.
He had 'set -u' in his ksh-.profile. This made sourcing the init-script for
modules fail.
('set -u' makes the shell treat all references to undefined variables an
error)
The problem is here: <Module-Path>/init/sh:
if [ "$LOADEDMODULES = "" ] ...
$LOADEDMODULES _is_ undefined in the beginning, so the shell barfs.
This needs to be changed to
if [ "${LOADEDMODULES:-}" = "" ]; then ...
(This parameter substitution is replaced by the valkue of the Var. if its
defined, or by the word following '-' if it's not defined. (The word is ""
here))
(So I finally learned for what to use this ;-)
The same thing occurs in
if [ "${MODULEPATH:-}" = "" ]; then
This should do the trick for ksh (checked), sh and bash.
I don't know about z|t?c|sh !
(If you need, I can make up a patch - right now I thaught this 'overkill')
Share and enjoy...
Martin
|