summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2009-12-03 15:58:36 +0100
committerSeth Mos <seth.mos@xs4all.nl>2009-12-03 15:58:36 +0100
commit0d60f50a230d030ee4ce128e9afc3391ff1a1d14 (patch)
treeb72195ab8b950cef44bfadb5d7f463a2738f03ef /etc
parent596a3abac6ca9bfea5ca0aeee60b4f2ba6524f6e (diff)
downloadpfsense-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')
-rwxr-xr-xetc/rc.php_ini_setup6
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
OpenPOWER on IntegriCloud