diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2009-12-03 15:58:36 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2009-12-03 15:58:36 +0100 |
commit | 0d60f50a230d030ee4ce128e9afc3391ff1a1d14 (patch) | |
tree | b72195ab8b950cef44bfadb5d7f463a2738f03ef /etc/rc.php_ini_setup | |
parent | 596a3abac6ca9bfea5ca0aeee60b4f2ba6524f6e (diff) | |
download | pfsense-0d60f50a230d030ee4ce128e9afc3391ff1a1d14.zip pfsense-0d60f50a230d030ee4ce128e9afc3391ff1a1d14.tar.gz |
Simplify and fix available memory calculation to fix shell script errors on boot.
Fix spelling error in comment
Diffstat (limited to 'etc/rc.php_ini_setup')
-rwxr-xr-x | etc/rc.php_ini_setup | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup index 5cb7743..ecefefc 100755 --- a/etc/rc.php_ini_setup +++ b/etc/rc.php_ini_setup @@ -29,11 +29,11 @@ PLATFORM=`cat /etc/platform` EXTENSIONSDIR="/usr/local/lib/php/20060613/" -# Grab amount of memory that is deteceted +# Grab amount of memory that is detected if [ -f /var/log/dmesg.boot ]; then - 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` + AVAILMEM=`/bin/cat /var/log/dmesg.boot |/usr/bin/awk '/avail memory/ { print $5 }'| sed 's/(//g'|tail -1` else - 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` + AVAILMEM=`/sbin/dmesg -a |/usr/bin/awk '/avail memory/ { print $5 }'| sed 's/(//g'|tail -1` fi # Calculate APC SHM size according |