fix container detection for LXC

This commit is contained in:
ilyam8 2022-05-08 21:46:53 +03:00
parent 79db69c48d
commit 51228b6239
1 changed files with 1 additions and 1 deletions

View File

@ -1035,7 +1035,7 @@ bool Platform_init(void) {
char lineBuffer[256]; char lineBuffer[256];
while (fgets(lineBuffer, sizeof(lineBuffer), fd)) { while (fgets(lineBuffer, sizeof(lineBuffer), fd)) {
// detect lxc or overlayfs and guess that this means we are running containerized // detect lxc or overlayfs and guess that this means we are running containerized
if (String_startsWith(lineBuffer, "lxcfs ") || String_startsWith(lineBuffer, "overlay ")) { if (String_startsWith(lineBuffer, "lxcfs /proc") || String_startsWith(lineBuffer, "overlay ")) {
Running_containerized = true; Running_containerized = true;
break; break;
} }