Date: 2009-06-28 16:06:21 +0000 (Sun, 28 Jun 2009)
We do not allow in install/setup, but it is possible to change the amount of RAM used for /ram to be a percentage of total RAM. I.e. something like 40%.
If the user changes that, we should trust him and therefore need to read main/flashsettings differently.
--- ipcop/trunk/src/rc.d/rc.flash.up 2009-06-28 16:02:28 UTC (rev 3148)
+++ ipcop/trunk/src/rc.d/rc.flash.up 2009-06-28 16:06:21 UTC (rev 3149)
@@ -1,5 +1,7 @@
+# This file is part of the IPCop Firewall.
# Called from rc.sysinit during initialisation for flash installed system.
# Creates ramdisk with symlinks etc.
@@ -9,7 +11,9 @@
# Max amount of RAM used by the tmpfs mount can be set through flashsettings file
# as a fixed size (eg 32M) or percentage (eg 50%). Default is 64M.
if [ -f /var/ipcop/main/flashsettings ] ; then
- eval $(/usr/local/bin/readhash /var/ipcop/main/flashsettings)
+ # Since we also allow the size to be set as a percentage (i.e. 50%)
+ # we can not use readhash here.
+ TMPFS_MAX_SIZE=`grep "^TMPFS_MAX_SIZE" /var/ipcop/main/flashsettings | cut -f 2 -d '='`
if [ ! $TMPFS_MAX_SIZE ] ; then
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.