From: Tim Starling Date: Mon, 19 May 2014 00:41:52 +0000 (+1000) Subject: Fix error message when swap is disabled X-Git-Tag: 1.31.0-rc.0~15667 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27vote%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=29f4fd503510617369663d5af2276dd4689bd89b;p=lhc%2Fweb%2Fwiklou.git Fix error message when swap is disabled Bug: 65465 Change-Id: Ibb1b14f5271d60c039398e8ce8a9c2a5d245241f --- diff --git a/includes/limit.sh b/includes/limit.sh index 82197b53ca..d71e660387 100644 --- a/includes/limit.sh +++ b/includes/limit.sh @@ -76,7 +76,10 @@ if [ "$MW_MEM_LIMIT" -gt 0 ]; then # Memory echo $(($MW_MEM_LIMIT*1024)) > "$MW_CGROUP"/$$/memory.limit_in_bytes # Memory+swap - echo $(($MW_MEM_LIMIT*1024)) > "$MW_CGROUP"/$$/memory.memsw.limit_in_bytes + # This will be missing if there is no swap + if [ -e "$MW_CGROUP"/$$/memory.memsw.limit_in_bytes ]; then + echo $(($MW_MEM_LIMIT*1024)) > "$MW_CGROUP"/$$/memory.memsw.limit_in_bytes + fi else ulimit -v "$MW_MEM_LIMIT" fi