Commit d50106fc authored by muicoder's avatar muicoder Committed by Brad Davidson

Fix memory cgroup check on kernels without v1 controller support

Signed-off-by: 's avatarmuicoder <muicoder@gmail.com>
parent a7649899
...@@ -1112,7 +1112,7 @@ has_working_xtables() { ...@@ -1112,7 +1112,7 @@ has_working_xtables() {
# --- startup systemd or openrc service --- # --- startup systemd or openrc service ---
service_enable_and_start() { 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)' 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 fi
......
b699722c5ce5896781fd0373f7c5de57555c5121cd1c6014d27afa56d98f5c53 install.sh 527dc64257a261b83042eb550f24648d2664656e8aef3d4633ac2a746848c6ae install.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment