From: Florian Fainelli Date: Thu, 14 Aug 2008 22:21:35 +0000 (+0000) Subject: Fix negative calculation of the tmpfs for devices with few RAM (#3557) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=38d1cb8cbd0945ca30bec4c8f12868f105758834;p=openwrt%2Fstaging%2Fldir.git Fix negative calculation of the tmpfs for devices with few RAM (#3557) SVN-Revision: 12315 --- diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit index 8c30fd8da1..11b9100383 100755 --- a/package/base-files/files/etc/preinit +++ b/package/base-files/files/etc/preinit @@ -20,7 +20,7 @@ failsafe() { mount proc /proc -t proc mount sysfs /sys -t sysfs -size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)l)?mt-l:s}' /proc/meminfo) mount tmpfs /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777 if grep devfs /proc/filesystems > /dev/null; then