diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-11-21 18:07:43 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-11-21 18:07:43 -0500 |
commit | 47eee8fabef9406ff2a6a7d6465ffd270de11a83 (patch) | |
tree | 1a664031c366a4d79c4089e76c97a95d64358bb6 | |
parent | 668e761d78d1a2c40f5ed58a2cff0f61bbc8ae20 (diff) | |
download | pfsense-47eee8fabef9406ff2a6a7d6465ffd270de11a83.zip pfsense-47eee8fabef9406ff2a6a7d6465ffd270de11a83.tar.gz |
Use dmesg -a when /var/log/dmesg.boot is not available
-rwxr-xr-x | etc/rc.php_ini_setup | 7 |
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 |