From d50106fcba90f24efb3962d2b58c3e3a1d1f492e Mon Sep 17 00:00:00 2001 From: muicoder Date: Fri, 28 Feb 2025 16:05:00 +0800 Subject: [PATCH] Fix memory cgroup check on kernels without v1 controller support Signed-off-by: muicoder --- install.sh | 2 +- install.sh.sha256sum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index bf5f3f80f690..6c337e235670 100755 --- a/install.sh +++ b/install.sh @@ -1112,7 +1112,7 @@ has_working_xtables() { # --- startup systemd or openrc service --- service_enable_and_start() { - if ! grep -qs memory /sys/fs/cgroup/cgroup.controllers && ! [ "$(grep -s memory /proc/cgroups | while read -r n n n enabled; do echo $enabled; done)" == "0" ]; then + if ! grep -qs memory /sys/fs/cgroup/cgroup.controllers && ! [ "$(grep -s memory /proc/cgroups | while read -r n n n enabled; do echo $enabled; done)" = "1" ]; then info 'Failed to find memory cgroup, you may need to add "cgroup_memory=1 cgroup_enable=memory" to your linux cmdline (/boot/cmdline.txt on a Raspberry Pi)' fi diff --git a/install.sh.sha256sum b/install.sh.sha256sum index 9d969c3d15bd..6ee6bdbb8bce 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -b699722c5ce5896781fd0373f7c5de57555c5121cd1c6014d27afa56d98f5c53 install.sh +527dc64257a261b83042eb550f24648d2664656e8aef3d4633ac2a746848c6ae install.sh