summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_firmware_auto.php
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-05-07 06:00:51 +0000
committerColin Smith <colin@pfsense.org>2005-05-07 06:00:51 +0000
commitebe916cfb7431e746cac528db34f16a33741ca16 (patch)
tree1b9066e9b843c6b99ba197ed11ba3468fba95c88 /usr/local/www/system_firmware_auto.php
parent0acbffd3a24313a101780118b3b8a3939f52d4e3 (diff)
downloadpfsense-ebe916cfb7431e746cac528db34f16a33741ca16.zip
pfsense-ebe916cfb7431e746cac528db34f16a33741ca16.tar.gz
* Tab consistency.
* Don't reboot unless we need to.
Diffstat (limited to 'usr/local/www/system_firmware_auto.php')
-rwxr-xr-xusr/local/www/system_firmware_auto.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr/local/www/system_firmware_auto.php b/usr/local/www/system_firmware_auto.php
index 5e0715e..f0a2ed6 100755
--- a/usr/local/www/system_firmware_auto.php
+++ b/usr/local/www/system_firmware_auto.php
@@ -56,8 +56,8 @@ require_once("xmlrpc.inc");
<tr>
<td>
<ul id="tabnav">
- <li class="tabact">Auto Update</a></li>
<li class="tabinact"><a href="system_firmware.php">Manual Update</a></li>
+ <li class="tabact">Auto Update</a></li>
</ul>
</td>
</tr>
@@ -93,6 +93,7 @@ require_once("xmlrpc.inc");
/* Define necessary variables. */
$update_types = array('full', 'diff');
+$didupdate = false;
if($_GET['category'] == 'full') {
$tocheck = 'all';
@@ -121,6 +122,7 @@ update_output_window($static_output);
foreach($categories as $index => $key) {
$bdiff_errors = array();
if(is_array($versions[$key][0])) { // Make sure we really need to update this section.
+ $didupdate = true;
update_status("Found required " . $key . " updates. Downloading...");
$static_output .= "Downloading " . $key . " updates... ";
update_output_window($static_output);
@@ -145,8 +147,13 @@ foreach($categories as $index => $key) {
}
}
}
-update_status("Update finished. Rebooting...");
-//exec("/etc/rc.reboot");
+
+if($didupdate == true) {
+ update_status("Update finished. Rebooting...");
+ exec("/etc/rc.reboot");
+} else {
+ update_status("No updates required.");
+}
echo "\n<script language=\"JavaScript\">document.progressbar.style.visibility='hidden';\n</script>";
OpenPOWER on IntegriCloud