summaryrefslogtreecommitdiffstats
path: root/etc/rc.bootup
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2013-09-02 23:49:02 -0700
committerPhil Davis <phil.davis@world.inf.org>2013-09-02 23:49:02 -0700
commite9215ad443d485a1fc7c2fa3a065025539ede861 (patch)
tree653da24243ad5d7e388d4b66054d1f17a51ccfbe /etc/rc.bootup
parent98c10c92c2d5d9c406841ed067811f645762733a (diff)
downloadpfsense-e9215ad443d485a1fc7c2fa3a065025539ede861.zip
pfsense-e9215ad443d485a1fc7c2fa3a065025539ede861.tar.gz
Use physmem and realmem from get_memory() in the appropriate places
Backport to 2.1
Diffstat (limited to 'etc/rc.bootup')
-rwxr-xr-xetc/rc.bootup9
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/rc.bootup b/etc/rc.bootup
index dda0b3c..ab10e53 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -128,7 +128,8 @@ echo ".";
/* get system memory amount */
$memory = get_memory();
-$avail = $memory[1];
+$physmem = $memory[0];
+$realmem = $memory[1];
echo " done.\n";
conf_mount_rw();
@@ -295,8 +296,8 @@ echo "Synchronizing user settings...";
local_sync_accounts();
echo "done.\n";
-if($avail > 0 and $avail < 65) {
- echo "System has less than 65 megabytes of ram {$avail}. Delaying webConfigurator startup.\n";
+if($realmem > 0 and $realmem < 65) {
+ echo "System has less than 65 megabytes of ram {$realmem}. Delaying webConfigurator startup.\n";
/* start webConfigurator up on final pass */
mwexec("/usr/local/sbin/pfSctl -c 'service restart webgui'");
} else {
@@ -385,7 +386,7 @@ if($config['system']['afterbootupshellcmd'] <> "") {
mwexec($config['system']['afterbootupshellcmd']);
}
-if($avail < $g['minimum_ram_warning']) {
+if($physmem < $g['minimum_ram_warning']) {
require_once("/etc/inc/notices.inc");
file_notice("{$g['product_name']}MemoryRequirements", "{$g['product_name']} requires at least {$g['minimum_ram_warning_text']} of RAM. Expect unusual performance. This platform is not supported.", "Memory", "", 1);
mwexec("/sbin/sysctl net.inet.tcp.recvspace=4096");
OpenPOWER on IntegriCloud