From 7310c677852c7a925c55922481052ad0ff7c8310 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 20 Jun 2010 11:33:29 +0200 Subject: make tmpfs size configurable via /etc/tmpfs --- package/base-files/Makefile | 2 +- package/base-files/src/init | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'package/base-files') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 3f63df3e6..34807d6a0 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 10 +PKG_RELEASE:= 11 PKG_DESCR:= basic filesystem structure and scripts PKG_SECTION:= base diff --git a/package/base-files/src/init b/package/base-files/src/init index 618547693..173e91b0b 100755 --- a/package/base-files/src/init +++ b/package/base-files/src/init @@ -4,7 +4,8 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin mount -nt proc proc /proc mount -o nosuid,nodev,noexec -t sysfs sysfs /sys [ ! -f /etc/notmpfs ] && { - size=$(awk '/MemTotal:/ { if ($2 > 16000) { print 4096 } else { print 2048 }}' /proc/meminfo) + size=2048 + size=$(cat /etc/tmpfs 2>/dev/null) mount none /tmp -t tmpfs -o size=${size}k mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 } -- cgit v1.2.3