diff --git a/lib/shell.c b/lib/shell.c index 05e3af8be5..f8a4b7fa55 100644 --- a/lib/shell.c +++ b/lib/shell.c @@ -223,17 +223,17 @@ static void mc_shell_recognize_path (mc_shell_t *mc_shell) { /* If shell is not symlinked to busybox, it is safe to assume it is a real shell */ - if (strstr (mc_shell->path, "/bash") != NULL || getenv ("BASH") != NULL) + if (strstr (mc_shell->path, "/bash") != NULL || getenv ("BASH_VERSION") != NULL) { mc_shell->type = SHELL_BASH; mc_shell->name = "bash"; } - else if (strstr (mc_shell->path, "/sh") != NULL || getenv ("SH") != NULL) + else if (strstr (mc_shell->path, "/sh") != NULL) { mc_shell->type = SHELL_SH; mc_shell->name = "sh"; } - else if (strstr (mc_shell->path, "/ash") != NULL || getenv ("ASH") != NULL) + else if (strstr (mc_shell->path, "/ash") != NULL || getenv ("BB_ASH_VERSION") != NULL) { mc_shell->type = SHELL_ASH_BUSYBOX; mc_shell->name = "ash";