summaryrefslogtreecommitdiffstats
path: root/etc/rc.php_ini_setup
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-11-21 18:07:43 -0500
committerScott Ullrich <sullrich@pfsense.org>2009-11-21 18:07:43 -0500
commit47eee8fabef9406ff2a6a7d6465ffd270de11a83 (patch)
tree1a664031c366a4d79c4089e76c97a95d64358bb6 /etc/rc.php_ini_setup
parent668e761d78d1a2c40f5ed58a2cff0f61bbc8ae20 (diff)
downloadpfsense-47eee8fabef9406ff2a6a7d6465ffd270de11a83.zip
pfsense-47eee8fabef9406ff2a6a7d6465ffd270de11a83.tar.gz
Use dmesg -a when /var/log/dmesg.boot is not available
Diffstat (limited to 'etc/rc.php_ini_setup')
-rwxr-xr-xetc/rc.php_ini_setup7
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup
index c63b493..b654b60 100755
--- a/etc/rc.php_ini_setup
+++ b/etc/rc.php_ini_setup
@@ -28,8 +28,11 @@
# Set our operating platform
PLATFORM=`cat /etc/platform`
EXTENSIONSDIR="/usr/local/lib/php/20060613/"
-AVAILMEM=`cat /var/log/dmesg.boot | grep "memory" | grep "avail" | awk '{ print $5 }' | cut -d'(' -f2 | cut -d'M' -f1`
-
+if [ -f /var/log/dmesg.boot ]; then
+ AVAILMEM=`cat /var/log/dmesg.boot | grep "memory" | grep "avail" | awk '{ print $5 }' | cut -d'(' -f2 | cut -d'M' -f1`
+else
+ AVAILMEM=`dmesg -a | grep "memory" | grep "avail" | awk '{ print $5 }' | cut -d'(' -f2 | cut -d'M' -f1`
+fi
# Calculate APC SHM size according
# to detected memory values
if [ "$AVAILMEM" -lt "128" ]; then
OpenPOWER on IntegriCloud