diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-05-23 16:12:27 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-05-23 16:12:27 -0400 |
commit | b713d7900f4725fe97e3f7ec278612f5589bec7b (patch) | |
tree | 9c3177721629f142716255415b060b5b241dc4b0 /etc | |
parent | 14cf5bf458ffc9e084ce45868ec2c9c4aebe494f (diff) | |
download | pfsense-b713d7900f4725fe97e3f7ec278612f5589bec7b.zip pfsense-b713d7900f4725fe97e3f7ec278612f5589bec7b.tar.gz |
Use hw.physmem when other methods fail
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.php_ini_setup | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup index 5d7de54..870db1c 100755 --- a/etc/rc.php_ini_setup +++ b/etc/rc.php_ini_setup @@ -36,6 +36,11 @@ else AVAILMEM=`/sbin/dmesg -a |/usr/bin/awk '/avail memory/ { memory=($4 / 1048576); printf("%0.0f\n", memory); exit}'` fi +if [ -z "$AVAILMEM" ]; then + MEM=`sysctl hw.physmem | cut -d':' -f2` + AVAILMEM=`expr $MEM / 1048576` +fi + # Calculate APC SHM size according # to detected memory values if [ "$AVAILMEM" -lt "128" ]; then |