From aa08f46b89d0149a2630cbc22fd33ba0328cc3be Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Sat, 12 Mar 2005 04:01:35 +0000 Subject: Make auto upgrade more obvious and make firmware screen a little cleaner --- usr/local/www/system_firmware.php | 61 ++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 29 deletions(-) (limited to 'usr') diff --git a/usr/local/www/system_firmware.php b/usr/local/www/system_firmware.php index dc5f652..f51d7f8 100755 --- a/usr/local/www/system_firmware.php +++ b/usr/local/www/system_firmware.php @@ -31,17 +31,6 @@ $d_isfwfile = 1; require("guiconfig.inc"); -if($_GET['autoupgrade'] <> "") { - $http_auth_username = ""; - $http_auth_password = ""; - if($config['system']['proxy_auth_username']) - $http_auth_username = $config['system']['proxy_auth_username']; - if($config['system']['proxy_auth_password']) - $http_auth_password = $config['system']['proxy_auth_password']; - exec_rc_script_async("/etc/rc.firmware_auto {$http_auth_username} {$http_auth_password}"); - $savemsg = "pfSense is now auto upgrading. The firewall will automatically reboot if it succeeds."; -} - /* checks with pfSense to see if a newer firmware version is available; returns any HTML message it gets from the server */ function check_firmware_version() { @@ -83,6 +72,21 @@ function check_firmware_version() { return null; } +/* Handle auto upgrade */ +if($_POST) { + if (stristr($_POST['autoupgrade'], "Auto")) { + $http_auth_username = ""; + $http_auth_password = ""; + if($config['system']['proxy_auth_username']) + $http_auth_username = $config['system']['proxy_auth_username']; + if($config['system']['proxy_auth_password']) + $http_auth_password = $config['system']['proxy_auth_password']; + exec_rc_script_async("/etc/rc.firmware_auto {$http_auth_username} {$http_auth_password}"); + $savemsg = "pfSense is now auto upgrading. The firewall will automatically reboot if it succeeds."; + } +} + +/* Handle manual upgrade */ if ($_POST && !file_exists($d_firmwarelock_path)) { unset($input_errors); @@ -186,15 +190,27 @@ print_info_box($sig_warning);
-

Click "Enable firmware - upload" below, then choose the image file (-*.img) - to be uploaded.
Click "Upgrade firmware" - to start the upgrade process.

+ + + + + + - + + + - - - - - - - - -
Invoke pfSense Auto Upgrade
  +

Click this button to automatically upgrade pfSense in the background. This may take a while.
+
+ +

 Invoke pfSense Manual Upgrade
  +

Click "Enable firmware + upload" below, then choose the image file (-*.img) + to be uploaded.
Click "Upgrade firmware" + to start the upgrade process.

@@ -217,19 +233,6 @@ print_info_box($sig_warning); storing the new firmware. The configuration will be maintained.
 
Invoke pfSense Auto Upgrade
  -

Click this button to automatically upgrade pfSense in the background. This may take a while.
-
- Invoke Auto Upgrade -

-- cgit v1.1