From 53164f4bab785ba74e6aed5ea872145bab3d0ddd Mon Sep 17 00:00:00 2001 From: Christof Schulze Date: Fri, 24 Feb 2017 19:15:50 +0100 Subject: [PATCH] fixup! gluon-core: limit memory that may be used by fq_codel to 1MB per AP on devices with less than 48MB RAM to avoid OOM --- .../files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/gluon-core/files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage b/package/gluon-core/files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage index ba37b142..cf0f1740 100755 --- a/package/gluon-core/files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage +++ b/package/gluon-core/files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage @@ -1,7 +1,7 @@ #!/bin/sh if [ "${ACTION}" = "add" ]; then - RAM=$(grep MemTotal /proc/meminfo |awk '{print $2}') + RAM=$(awk '/MemTotal/ {print $2}' /proc/meminfo) if [ "$RAM" -lt $((48*1024)) ]; then echo "fq_memory_limit 1048576" > "/sys/kernel/debug/ieee80211/$DEVICENAME/aqm" fi