summaryrefslogtreecommitdiffstats
path: root/src/etc/rc.php_ini_setup
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-30 14:33:12 -0300
committerRenato Botelho <renato@netgate.com>2015-09-30 14:33:36 -0300
commitc580e34c6fe24107817d6a72956e77b23f043beb (patch)
tree5b2a610df5a8a167ed0d32b48b03611e07489886 /src/etc/rc.php_ini_setup
parent205c51a217d29316334aebbc0cbc123794ba5160 (diff)
downloadpfsense-c580e34c6fe24107817d6a72956e77b23f043beb.zip
pfsense-c580e34c6fe24107817d6a72956e77b23f043beb.tar.gz
Consider globals_override.inc and replace hard coded pfSense string by product_name
Diffstat (limited to 'src/etc/rc.php_ini_setup')
-rwxr-xr-xsrc/etc/rc.php_ini_setup11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/etc/rc.php_ini_setup b/src/etc/rc.php_ini_setup
index be66023..880f0f7 100755
--- a/src/etc/rc.php_ini_setup
+++ b/src/etc/rc.php_ini_setup
@@ -76,7 +76,16 @@ fi
# Set upload directory
if [ "$PLATFORM" = "nanobsd" ]; then
- UPLOADTMPDIR=`/usr/bin/grep upload_path /etc/inc/globals.inc | /usr/bin/cut -d'"' -f4`
+ globals_inc="/etc/inc/globals.inc"
+ if [ -f /etc/inc/globals_override.inc ]; then
+ globals_inc="/etc/inc/globals_override.inc ${globals_inc}"
+ fi
+ UPLOADTMPDIR=$(cat ${globals_inc} | \
+ grep upload_path | \
+ head -n 1 | \
+ sed 's/^.*=>* *//; s/["\;,]*//g')
+
+ UPLOADTMPDIR=${UPLOADTMPDIR:-"/root"}
else
UPLOADTMPDIR="/tmp"
fi
OpenPOWER on IntegriCloud