Today I upgraded from Ubuntu 16.04 to 18.04 to 20.04
After Login I get the error
Error found when loading /etc/profile:
/etc/profile.d/modules.sh: line 6: usr/share/modules/init/sh: no such file or dicrectory
As a result the session will not be configured correctly.
You should fix the problem as soon as feasible
The code in etc/profile.d/modules.sh
is:
shell=$(/usr/bin/basename $(/bin/ps -p $$ -ocomm=))
if [ -f /usr/share/modules/init/$shell ]; then
. /usr/share/modules/init/$shell
else
. /usr/share/modules/init/sh
fi
But
The path /usr/share/modules
does not exist
How to adapt the script?