summaryrefslogtreecommitdiffstats
path: root/src/etc/rc.firmware_auto
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/rc.firmware_auto')
-rwxr-xr-xsrc/etc/rc.firmware_auto18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/etc/rc.firmware_auto b/src/etc/rc.firmware_auto
index 5b355df..866db66 100755
--- a/src/etc/rc.firmware_auto
+++ b/src/etc/rc.firmware_auto
@@ -10,7 +10,17 @@ FMBASEURL=$1
FMFILENAME=$2
FETCHFILENAME=$1/$2
-product=`cat /etc/inc/globals.inc | grep product_name | 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
+product=$(cat ${globals_inc} | \
+ grep product_name | \
+ head -n 1 | \
+ sed 's/^.*=>* *//; s/["\;,]*//g')
+
+# product cannot be blank
+product=${product:-"pfSense"}
# wait 5 seconds before beginning
sleep 5
@@ -56,12 +66,12 @@ if [ "$DLHASH" = "$FILEHASH" ]; then
/usr/local/bin/php-cgi /etc/rc.conf_mount_rw
fi
if [ -r "/tmp/custom.tgz" ]; then
- sh /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz /tmp/custom.tgz
+ sh /etc/rc.firmware ${product}upgrade /tmp/latest.tgz /tmp/custom.tgz
else
if [ "$PLATFORM" = "nanobsd" ]; then
- sh /etc/rc.firmware pfSenseNanoBSDupgrade /tmp/latest.tgz
+ sh /etc/rc.firmware ${product}NanoBSDupgrade /tmp/latest.tgz
else
- sh /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz
+ sh /etc/rc.firmware ${product}upgrade /tmp/latest.tgz
fi
fi
exit 0
OpenPOWER on IntegriCloud