summaryrefslogtreecommitdiffstats
path: root/etc/rc.bootup
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2013-08-28 13:13:37 -0700
committerPhil Davis <phil.davis@world.inf.org>2013-08-28 13:13:37 -0700
commit5517f604721d1ed844ede577cbeab12ceddfd06b (patch)
treee1d9cab28bb0a88843bfffddf7fce24e4fb814ed /etc/rc.bootup
parent6b0739ac3726d61ae819e6d62cc687684fe68a49 (diff)
downloadpfsense-5517f604721d1ed844ede577cbeab12ceddfd06b.zip
pfsense-5517f604721d1ed844ede577cbeab12ceddfd06b.tar.gz
Use physmem and realmem from get_memory() in the appropriate places
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