diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-09-01 18:08:42 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-09-01 18:08:42 +0000 |
commit | 1ef7b568dbc875be4c2734d1e3df3fc9f0bbb747 (patch) | |
tree | bf12f5a3c920356c1ebe9b29a59918dc9949dd7f /usr | |
parent | 9503c25e0826215c5bbb63a419c34aa902dbdd2f (diff) | |
download | pfsense-1ef7b568dbc875be4c2734d1e3df3fc9f0bbb747.zip pfsense-1ef7b568dbc875be4c2734d1e3df3fc9f0bbb747.tar.gz |
* Move lighty upload to a definable globals.inc value upload_path
* Use new upload_path for firmware updates
This in combination with 128 megabyte embedded images should fix the dreaded upgrade problem for the embedded platform.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/system_firmware.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php index 4074d60..33f3593 100755 --- a/usr/local/www/system_firmware.php +++ b/usr/local/www/system_firmware.php @@ -86,10 +86,10 @@ if ($_POST && !file_exists($d_firmwarelock_path)) { unlink($d_fwupenabled_path); } else { /* move the image so PHP won't delete it */ - rename($_FILES['ulfile']['tmp_name'], "{$g['tmp_path']}/firmware.tgz"); + rename($_FILES['ulfile']['tmp_name'], "{$g['upload_path']}/firmware.tgz"); /* check digital signature */ - $sigchk = verify_digital_signature("{$g['tmp_path']}/firmware.tgz"); + $sigchk = verify_digital_signature("{$g['upload_path']}/firmware.tgz"); if ($sigchk == 1) $sig_warning = "The digital signature on this image is invalid."; @@ -100,22 +100,22 @@ if ($_POST && !file_exists($d_firmwarelock_path)) { if (!verify_gzip_file("{$g['tmp_path']}/firmware.tgz")) { $input_errors[] = "The image file is corrupt."; - unlink("{$g['tmp_path']}/firmware.tgz"); + unlink("{$g['upload_path']}/firmware.tgz"); } } } - /* Check for input errors, firmware locks, warnings, then check for firmware if sig_override is set */ - if (!$input_errors && !file_exists($d_firmwarelock_path) && (!$sig_warning || $_POST['sig_override'])) { - if (file_exists("{$g['tmp_path']}/firmware.tgz")) { - /* fire up the update script in the background */ - touch($d_firmwarelock_path); - $savemsg = "The firmware is now being updated. The firewall will reboot automatically."; - mwexec_bg("/etc/rc.firmware pfSenseupgrade {$g['tmp_path']}/firmware.tgz"); - } else { - $savemsg = "Firmware image missing or other error, please try again."; - } - } + /* Check for input errors, firmware locks, warnings, then check for firmware if sig_override is set */ + if (!$input_errors && !file_exists($d_firmwarelock_path) && (!$sig_warning || $_POST['sig_override'])) { + if (file_exists("{$g['upload_path']}/firmware.tgz")) { + /* fire up the update script in the background */ + touch($d_firmwarelock_path); + $savemsg = "The firmware is now being updated. The firewall will reboot automatically."; + mwexec_bg("/etc/rc.firmware pfSenseupgrade {$g['upload_path']}/firmware.tgz"); + } else { + $savemsg = "Firmware image missing or other error, please try again."; + } + } } } } @@ -128,7 +128,7 @@ include("head.inc"); <?php include("fbegin.inc"); ?> <p class="pgtitle"><?=$pgtitle?></p> <?php if ($input_errors) print_input_errors($input_errors); ?> -<?php if ($savemsg) print_info_box($savemsg); ?> +<?php if ($savemsg) print_info_box($savemsg); ?> <?php if ($fwinfo <> "") print_info_box($fwinfo); ?> <?php if ($sig_warning && !$input_errors): ?> <form action="system_firmware.php" method="post"> |