Fix negative calculation of the tmpfs for devices with few RAM (#3557)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12315 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Florian Fainelli 2008-08-14 22:21:35 +00:00
parent 49f78b6b0e
commit 26ed76587c
1 changed files with 1 additions and 1 deletions

View File

@ -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)
size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)&&(mt>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