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

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