Blame SOURCES/environment-modules-profilesh-misdetects-login-shell.patch

b63c00
diff --git a/init/profile.sh.in b/init/profile.sh.in
b63c00
index faa468639..64d21dbcd 100644
b63c00
--- a/init/profile.sh.in
b63c00
+++ b/init/profile.sh.in
b63c00
@@ -3,7 +3,11 @@
b63c00
 # get current shell name by querying shell variables or looking at parent
b63c00
 # process name
b63c00
 if [ -n "${BASH:-}" ]; then
b63c00
-   shell=${BASH##*/}
b63c00
+   if [ "${BASH##*/}" = 'sh' ]; then
b63c00
+      shell='sh'
b63c00
+   else
b63c00
+      shell='bash'
b63c00
+   fi
b63c00
 elif [ -n "${ZSH_NAME:-}" ]; then
b63c00
    shell=$ZSH_NAME
b63c00
 else
b63c00