changeset 401:1dc8c70afbe5

* Reduce /etc ramfs to 1M. * Create required subdirs from list. TODO: get list of required subdirs from external variable.
author Aleksandr Rybalko <ray@ddteam.net>
date Fri, 04 May 2012 12:50:54 +0300
parents 30ccc9a1b978
children 9c57b3ea8b41
files profiles/SMALL_/files/etc/rc.d/mountcritlocal
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/profiles/SMALL_/files/etc/rc.d/mountcritlocal	Fri May 04 12:49:09 2012 +0300
+++ b/profiles/SMALL_/files/etc/rc.d/mountcritlocal	Fri May 04 12:50:54 2012 +0300
@@ -12,16 +12,15 @@
 {
 	# XXX: check TMPFS again
 	# XXX: get useful size: small for /etc or big for upgrade
-	md=`/sbin/mdconfig -a -t malloc -s 10m`
+	md=`/sbin/mdconfig -a -t malloc -s 1m`
 	newfs -b 4096 -f 512 -n -o space /dev/${md} > /dev/null
 	mount /dev/${md} /tmp
 
 	mkdir -p /tmp/etc
-	mkdir -p /tmp/var/empty
-	mkdir -p /tmp/var/log
-	mkdir -p /tmp/var/run
-	mkdir -p /tmp/var/spool/lock
-	mkdir -p /tmp/var/tmp
+	for dir in account at audit cache db empty lib log mail msgs preserve \
+	    run spool/lock tmp; do
+		mkdir -p /tmp/var/${dir}
+	done
 	touch /tmp/var/log/all.log
 
 	mount_unionfs /tmp/etc /etc