mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-08 13:42:10 -05:00
Fix negative calculation of the tmpfs for devices with few RAM (#3557)
SVN-Revision: 12315
This commit is contained in:
parent
3403cbe948
commit
38d1cb8cbd
@ -20,7 +20,7 @@ failsafe() {
|
|||||||
mount proc /proc -t proc
|
mount proc /proc -t proc
|
||||||
mount sysfs /sys -t sysfs
|
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
|
mount tmpfs /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777
|
||||||
|
|
||||||
if grep devfs /proc/filesystems > /dev/null; then
|
if grep devfs /proc/filesystems > /dev/null; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user