summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-05-19 23:00:45 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-05-19 23:00:45 +0000
commit59fe3cdfd5f9b6a89c2491ba144e0d922a2253a8 (patch)
tree52d9c35507de296f0ce599f18b5807f2c9df4412
parente559aae9f9a26f758b2b6e3b255dce6d5d1f7d4c (diff)
downloadpfsense-59fe3cdfd5f9b6a89c2491ba144e0d922a2253a8.zip
pfsense-59fe3cdfd5f9b6a89c2491ba144e0d922a2253a8.tar.gz
* Execute firmware upgrade in the background
* Reboot again from /etc/rc.firmware, not from the web gui. This can be *dangerous* if the user cancels the update, navigates away from the page, etc.
-rwxr-xr-xetc/rc.firmware2
-rwxr-xr-xusr/local/www/system_firmware.php5
2 files changed, 4 insertions, 3 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware
index 8b21977..7da6c04 100755
--- a/etc/rc.firmware
+++ b/etc/rc.firmware
@@ -112,6 +112,7 @@ upgrade)
/sbin/mount -r /cf
echo "Done."
+ /etc/rc.reboot
;;
pfSenseupgrade)
# wait 5 seconds before beginning
@@ -160,6 +161,7 @@ pfSenseupgrade)
/sbin/mount -r /cf
echo "Done." | logger -p daemon.info -i -t Upgrade
+ /etc/rc.reboot
;;
delta_update)
backup_chflags
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php
index db48f2b..2362064 100755
--- a/usr/local/www/system_firmware.php
+++ b/usr/local/www/system_firmware.php
@@ -93,9 +93,8 @@ if ($_POST && !file_exists($d_firmwarelock_path)) {
if (!$input_errors && !file_exists($d_firmwarelock_path) && (!$sig_warning || $_POST['sig_override'])) {
/* fire up the update script in the background */
touch($d_firmwarelock_path);
- $savemsg = "The firmware is now being installed. The firewall will reboot automatically.";
- exec("/etc/rc.firmware pfSenseupgrade {$g['tmp_path']}/firmware.tgz");
- exec("/etc/rc.reboot");
+ $savemsg = "The firmware is now being updated. The firewall will reboot automatically.";
+ mwexec_bg("/etc/rc.firmware pfSenseupgrade {$g['tmp_path']}/firmware.tgz");
}
}
}
OpenPOWER on IntegriCloud