Ignore:
Timestamp:
2008-08-15T00:21:35+02:00 (8 years ago)
Author:
florian
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/etc/preinit

    r12231 r12315  
    2121mount sysfs /sys -t sysfs 
    2222 
    23 size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)?mt-l:s}' /proc/meminfo) 
     23size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)&&(mt>l)?mt-l:s}' /proc/meminfo) 
    2424mount tmpfs /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777 
    2525 
Note: See TracChangeset for help on using the changeset viewer.