summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-05-23 16:12:27 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-05-23 16:12:27 -0400
commitb713d7900f4725fe97e3f7ec278612f5589bec7b (patch)
tree9c3177721629f142716255415b060b5b241dc4b0
parent14cf5bf458ffc9e084ce45868ec2c9c4aebe494f (diff)
downloadpfsense-b713d7900f4725fe97e3f7ec278612f5589bec7b.zip
pfsense-b713d7900f4725fe97e3f7ec278612f5589bec7b.tar.gz
Use hw.physmem when other methods fail
-rw-r--r--PCBSD/pc-sysinstall/backend/functions-extractimage.sh4
-rwxr-xr-xetc/rc.php_ini_setup5
2 files changed, 7 insertions, 2 deletions
diff --git a/PCBSD/pc-sysinstall/backend/functions-extractimage.sh b/PCBSD/pc-sysinstall/backend/functions-extractimage.sh
index ee4966e..9868c53 100644
--- a/PCBSD/pc-sysinstall/backend/functions-extractimage.sh
+++ b/PCBSD/pc-sysinstall/backend/functions-extractimage.sh
@@ -276,8 +276,8 @@ init_extraction()
oIFS=$IFS
IFS=","
for FILE in $INSFILE; do
- echo_log "pc-sysinstall: Running cpdup -I -o /${FILE} /mnt/${FILE}"
- /usr/local/bin/cpdup -I -o /${FILE} /mnt/${FILE} >&1 2>&1
+ echo_log "pc-sysinstall: Running cpdup -vvv -I -o /${FILE} /mnt/${FILE}"
+ /usr/local/bin/cpdup -vvv -I -o /${FILE} /mnt/${FILE} >&1 2>&1
if [ "$?" != "0" ]
then
echo "CPDUP failure occured:" >>${LOGOUT}
diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup
index 5d7de54..870db1c 100755
--- a/etc/rc.php_ini_setup
+++ b/etc/rc.php_ini_setup
@@ -36,6 +36,11 @@ else
AVAILMEM=`/sbin/dmesg -a |/usr/bin/awk '/avail memory/ { memory=($4 / 1048576); printf("%0.0f\n", memory); exit}'`
fi
+if [ -z "$AVAILMEM" ]; then
+ MEM=`sysctl hw.physmem | cut -d':' -f2`
+ AVAILMEM=`expr $MEM / 1048576`
+fi
+
# Calculate APC SHM size according
# to detected memory values
if [ "$AVAILMEM" -lt "128" ]; then
OpenPOWER on IntegriCloud