From 74cf1cee473b740a1b84586b640c5edf40dc8cce Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Mon, 1 Apr 2024 03:39:05 +0300 Subject: [PATCH] Check for /bin directory existence and use /usr/bin as fallback --- kshell/shell.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kshell/shell.cpp b/kshell/shell.cpp index 6f294fc4..49d40db7 100644 --- a/kshell/shell.cpp +++ b/kshell/shell.cpp @@ -750,7 +750,12 @@ void StartKernelShell() } std::string path = "/bin/"; + + if (!fs->PathExists("/bin")) + path = "/usr/bin/"; + path += cmd_only; + debug("path: %s", path.c_str()); if (fs->PathExists(path.c_str())) { const char *envp[5] = {