Skip to content

Commit

Permalink
Fix memory cgroup check on kernels without v1 controller support
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Feb 28, 2025
1 parent 0867baa commit 1c6dc31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1112,8 +1112,7 @@ has_working_xtables() {

# --- startup systemd or openrc service ---
service_enable_and_start() {
if [ -f "/proc/cgroups" ] && [ "$(grep memory /proc/cgroups | while read -r n n n enabled; do echo $enabled; done)" -eq 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)" == "0" ]; 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
Expand Down
2 changes: 1 addition & 1 deletion install.sh.sha256sum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b0715fb49a4a1d32241ac23c222a1d343baa1f2846f25032b306d1b30dbacd15 install.sh
b699722c5ce5896781fd0373f7c5de57555c5121cd1c6014d27afa56d98f5c53 install.sh

0 comments on commit 1c6dc31

Please sign in to comment.