summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_firmware_settings.php
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-06-29 04:04:13 +0000
committerColin Smith <colin@pfsense.org>2005-06-29 04:04:13 +0000
commit0b2e3c64448ded8b5b3093114f75241f272163fd (patch)
tree9074a98cdc16da080221becb9962601cd4e1615e /usr/local/www/system_firmware_settings.php
parentf822e350e226c1b74e2b2c946943f9fda0d28a2d (diff)
downloadpfsense-0b2e3c64448ded8b5b3093114f75241f272163fd.zip
pfsense-0b2e3c64448ded8b5b3093114f75241f272163fd.tar.gz
Add firmware updater settings page. This will eventually be used to set the desired update mirror, branch to track, etc.
Diffstat (limited to 'usr/local/www/system_firmware_settings.php')
-rwxr-xr-xusr/local/www/system_firmware_settings.php147
1 files changed, 147 insertions, 0 deletions
diff --git a/usr/local/www/system_firmware_settings.php b/usr/local/www/system_firmware_settings.php
new file mode 100755
index 0000000..e881aea
--- /dev/null
+++ b/usr/local/www/system_firmware_settings.php
@@ -0,0 +1,147 @@
+#!/usr/local/bin/php
+<?php
+/* $Id$ */
+/*
+ system_advanced.php
+ part of pfSense
+ Copyright (C) 2005 Scott Ullrich
+
+ originally part of m0n0wall (http://m0n0.ch/wall)
+ Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+require("guiconfig.inc");
+
+if ($_POST) {
+ $config['system']['firmware']['branch'] = $_POST['branch'];
+ write_config();
+}
+
+$curcfg = $config['system']['firmware'];
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title><?=gentitle("System: Firmware Settings");?></title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link href="gui.css" rel="stylesheet" type="text/css">
+<script language="JavaScript">
+<!--
+function enable_change(enable_over) {
+ if (document.iform.ipv6nat_enable.checked || enable_over) {
+ document.iform.ipv6nat_ipaddr.disabled = 0;
+ document.iform.schedulertype.disabled = 0;
+ } else {
+ document.iform.ipv6nat_ipaddr.disabled = 1;
+ }
+}
+
+var systemdescs=new Array(4);
+systemdescs[0]="This patch system uses a combination of unified and binary diffs. This system requires the least bandwidth, but is less forgiving of errors.";
+systemdescs[1]="This patch system uses tar files to update the system. This requires the most bandwidth, but is more reliable.";
+systemdescs[2]="This patch system uses tar files for the kernel and base system, and unified diffs for other components.";
+
+var branchinfo=new Array(4);
+branchinfo[0]="The stable branch contains only those updates believed to be stable by the developers.";
+branchinfo[1]="This branch contains both stable updates as well as those believed to be fairly stable.";
+branchinfo[2]="This branch contains all released updates, regardless of stability.";
+
+function update_description(itemnum) {
+ document.forms[0].branchinfo.value=branchinfo[itemnum];
+}
+
+// -->
+</script>
+</head>
+
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+<form action="system_firmware_settings.php" method="post" name="iform" id="iform">
+<?php
+include("fbegin.inc");
+?>
+ <p class="pgtitle">System: Firmware Settings</p>
+
+ <?php if ($savemsg) print_info_box($savemsg); ?>
+ <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td>
+ <ul id="tabnav">
+ <li class="tabinact"><a href="system_firmware.php">Manual Update</a></li>
+ <li class="tabinact"><a href="system_firmware_check.php">Auto Update</a></li>
+ <li class="tabact">Updater Settings</li>
+ </ul>
+ </td>
+ </tr>
+ <tr><td class="tabcont"><table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td colspan="2" valign="top" class="listtopic">Firmware Branch</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">Firmware Branch</td>
+ <td width="78%" class="vtable">
+ <select onChange="update_description(this.selectedIndex);" name="branch" id="branch">
+ <option value="stable"<?php if($curcfg['branch']=="stable") echo " SELECTED"; ?>>Stable</option>
+ <option value="beta"<?php if($curcfg['branch']=="beta") echo " SELECTED"; ?>>Beta</option>
+ <option value="alpha"<?php if($config['branch']=="alpha") echo " SELECTED"; ?>>Alpha</option>
+ </select>
+ <textarea cols="60" rows="2" id="branchinfo" name="branchinfo"style="border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;">
+ </textarea>
+ <script language="javascript">
+ update_description(document.forms[0].branch.selectedIndex);
+ </script>
+ <br><span class="vexpl"><b>Select the update branch you would like this system to track</b></td>
+ </tr>
+<!--
+ <tr>
+ <td width="22%" valign="top" class="vncell">Update Preference</td>
+ <td width="78%" class="vtable">
+ <select onChange="update_description(branchinfo, this.selectedIndex);" name="branch" id="branch">
+ <option value="patches"<?php if($curcfg['updates']=="diffs") echo " SELECTED"; ?>>Patches</option>
+ <option value="full"<?php if($curcfg['updates']=="full") echo " SELECTED"; ?>>Full Updates</option>
+ <option value="combination"<?php if($config['updates']=="combination") echo " SELECTED"; ?>>Combination</option>
+ </select>
+ <textarea cols="60" rows="2" id="info" name="info"style="border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;">
+ </textarea>
+ <script language="javascript">
+ update_description(branchinfo, document.forms[0].optimization.selectedIndex);
+ </script>
+ <br><span class="vexpl"><b>Select the update branch you would like this system to track</b></td>
+ </tr>
+-->
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)">
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="list" height="12"></td>
+ </tr>
+ </table></td></tr></table>
+</form>
+<?php include("fend.inc"); ?>
+</body>
+</html>
OpenPOWER on IntegriCloud