Package: environment-modules
Version: 5.2.0-1

Within a ksh93 login shell session, module command is not properly initialized:

$ module --version
-ksh93: module[7]: local: not found
-ksh93: module[19]: [: argument expected

This error is obtained because the module function is initialized in
/etc/profile.d/modules.sh as if current shell was a "bash sh" shell.

Code in /etc/profile.d/modules.sh should be adapted to cope with
$shell variable equaling ksh93, which should lead to the source of
/usr/share/modules/init/ksh file.

Steps to reproduce the issue:

1. apt-get install ksh environment-modules
2. useradd foo
3. chsh -s /bin/ksh93 foo
4. su - foo
5. module --version

Reply via email to