SV: compatibility issue in environment-modules version 4.1.1-1

Gösta Ljungdahl gosta.ljungdahl at
Mon May 6 07:36:40 UTC 2019

Hash: SHA256

"The shebang line is ignored if a file is sourced, isn't it?"

You tell me! I'm sure your guess is better than mine. All I really know is that at some point in the initialization process dash comes into play and is not equal to the task. I know this because the initialization works as expected if I change /bin/sh to point to /bin/bash.


- -----Ursprungligt meddelande-----
Från: Gunnar Hjalmarsson [mailto:gunnarhj at]
Skickat: den 5 maj 2019 22:35
Till: Josefsson-Ljungdahl <goslju at>; Ubuntu Developers <ubuntu-devel-discuss at>; Gösta Ljungdahl <gosta.ljungdahl at>
Ämne: Re: compatibility issue in environment-modules version 4.1.1-1

On 2019-05-05 21:38, Josefsson-Ljungdahl wrote:
> Den sön 5 maj 2019 kl 21:26 skrev Gunnar Hjalmarsson
> <gunnarhj at <mailto:gunnarhj at>>:
>> Ubuntu does that as well, at least when GDM or LightDM is used. Maybe
>> worth mentioning that the scripts in the Ubuntu versions of those DMs
>> are run as bash processes. (That was changed a few years ago;
>> previously they were run as dash processes.)
> OK, that's good but since Ubuntu does have /bin/sh pointing to
> /bin/dash and the initialisation procedure sources scripts with
> #!/bin/sh it doesn't go all the way in this case.

The shebang line is ignored if a file is sourced, isn't it?

 From a quick look at the code in environment-modules I see that it seems to test for the BASH_VERSION variable. That makes me think of this change of LightDM:

which was made in response to:

Can this possibly be a reason for the confusion you have observed?

- --
Gunnar Hjalmarsson

Signed with OpenPGP for Outlook by Encryptomatic LLC. Free for personal use.
Learn more at

Version: Encryptomatic OpenPGP Add-in for MS Outlook


More information about the Ubuntu-devel-discuss mailing list