Project

General

Profile

« Previous | Next » 

Revision 0d60f50a

Added by Seth Mos over 15 years ago

Simplify and fix available memory calculation to fix shell script errors on boot.
Fix spelling error in comment

View differences:

etc/rc.php_ini_setup
29 29
PLATFORM=`cat /etc/platform`
30 30
EXTENSIONSDIR="/usr/local/lib/php/20060613/"
31 31

  
32
# Grab amount of memory that is deteceted
32
# Grab amount of memory that is detected
33 33
if [ -f /var/log/dmesg.boot ]; then
34
	AVAILMEM=`/bin/cat /var/log/dmesg.boot | /usr/bin/grep "memory" | /usr/bin/grep "avail" | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d'(' -f2 | /usr/bin/cut -d'M' -f1`
34
	AVAILMEM=`/bin/cat /var/log/dmesg.boot |/usr/bin/awk '/avail memory/ { print $5 }'| sed 's/(//g'|tail -1`
35 35
else 
36
	AVAILMEM=`/sbin/dmesg -a | /usr/bin/grep "memory" | /usr/bin/grep "avail" | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d'(' -f2 | /usr/bin/cut -d'M' -f1`
36
	AVAILMEM=`/sbin/dmesg -a |/usr/bin/awk '/avail memory/ { print $5 }'| sed 's/(//g'|tail -1`
37 37
fi
38 38

  
39 39
# Calculate APC SHM size according 

Also available in: Unified diff