From ebe916cfb7431e746cac528db34f16a33741ca16 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Sat, 7 May 2005 06:00:51 +0000 Subject: * Tab consistency. * Don't reboot unless we need to. --- usr/local/www/system_firmware.php | 3 +-- usr/local/www/system_firmware_auto.php | 13 ++++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'usr') diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php index b9ba6cb..db48f2b 100755 --- a/usr/local/www/system_firmware.php +++ b/usr/local/www/system_firmware.php @@ -147,9 +147,8 @@ print_info_box($sig_warning); 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"); @@ -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"; -- cgit v1.1