diff options
author | Florian Fainelli <florian@openwrt.org> | 2008-08-14 22:21:35 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2008-08-14 22:21:35 +0000 |
commit | 38d1cb8cbd0945ca30bec4c8f12868f105758834 (patch) | |
tree | 294657f24d954b9085bc3dc3ab56474e92a1a030 /package/base-files/files/etc/preinit | |
parent | 3403cbe948ca5da2a00a64374b6d0ba26d0c5085 (diff) | |
download | mtk-20170518-38d1cb8cbd0945ca30bec4c8f12868f105758834.zip mtk-20170518-38d1cb8cbd0945ca30bec4c8f12868f105758834.tar.gz mtk-20170518-38d1cb8cbd0945ca30bec4c8f12868f105758834.tar.bz2 |
Fix negative calculation of the tmpfs for devices with few RAM (#3557)
SVN-Revision: 12315
Diffstat (limited to 'package/base-files/files/etc/preinit')
-rwxr-xr-x | package/base-files/files/etc/preinit | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit index 8c30fd8..11b9100 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) +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 |