diff options
author | Renato Botelho <renato@netgate.com> | 2015-09-30 14:33:12 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-09-30 14:33:36 -0300 |
commit | c580e34c6fe24107817d6a72956e77b23f043beb (patch) | |
tree | 5b2a610df5a8a167ed0d32b48b03611e07489886 /src/etc/rc.php_ini_setup | |
parent | 205c51a217d29316334aebbc0cbc123794ba5160 (diff) | |
download | pfsense-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-x | src/etc/rc.php_ini_setup | 11 |
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 |