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

This commit is contained in:
Christof Schulze 2017-02-24 19:15:50 +01:00
parent ec284233ea
commit 53164f4bab

View File

@ -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