[OpenWrt-Tickets] [OpenWrt] #1639: size of /tmp partition in 2.6
targets
OpenWrt
openwrt-devel at lists.openwrt.org
Fri May 4 18:21:04 CEST 2007
#1639: size of /tmp partition in 2.6 targets
-----------------------------+----------------------------------------------
Reporter: ffrrrr at gmail | Owner: developers
Type: defect | Status: new
Priority: normal | Milestone:
Component: packages | Keywords:
-----------------------------+----------------------------------------------
There is no 'Mem:' line in /proc/meminfo with linux-2.6.
So, in /sbin/mount_root, or /etc/preinit for brcm47xx-2.6 target, the size
of /tmp tmpfs does not get calculated by :
{{{
size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
}}}
the mount command becomes :
{{{
mount none /tmp -t tmpfs -o size=
}}}
/tmp is correctly mounted but it does not appear with a 'df'.
It can be replaced by :
{{{
size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)?mt-l:s}'
/proc/meminfo)
mount none /tmp -t tmpfs -o size=$size
}}}
but in fact, the default size of a tmpfs mount is half of the total
memory, so it should be ok with :
{{{
mount none /tmp -t tmpfs
}}}
--
Ticket URL: <https://dev.openwrt.org/ticket/1639>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
More information about the openwrt-tickets
mailing list