Commit e8b42bb6 authored by Ad Schellevis's avatar Ad Schellevis

remove some package code

parent 99482601
...@@ -2460,7 +2460,7 @@ function filter_generate_user_rule($rule) ...@@ -2460,7 +2460,7 @@ function filter_generate_user_rule($rule)
* # keep state * # keep state
* works with TCP, UDP, and ICMP. * works with TCP, UDP, and ICMP.
* # modulate state * # modulate state
* works only with TCP. pfSense will generate strong Initial Sequence Numbers (ISNs) * works only with TCP. OPNsense will generate strong Initial Sequence Numbers (ISNs)
* for packets matching this rule. * for packets matching this rule.
* # synproxy state * # synproxy state
* proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. * proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods.
......
...@@ -75,20 +75,7 @@ $iptos = array("lowdelay", "throughput", "reliability"); ...@@ -75,20 +75,7 @@ $iptos = array("lowdelay", "throughput", "reliability");
$tcpflags = array("syn", "ack", "fin", "rst", "psh", "urg", "ece", "cwr"); $tcpflags = array("syn", "ack", "fin", "rst", "psh", "urg", "ece", "cwr");
if(file_exists("/usr/local/etc/platform")) { if(file_exists("/usr/local/etc/platform")) {
$arch = php_uname("m");
/* Do not remove this, it is not needed for the snapshots URL but is needed later for the -RELEASE/stable URLs */
//$arch = ($arch == "i386") ? "" : '/' . $arch;
/* Full installs and NanoBSD use the same update directory and manifest in 2.x */
$g['update_url']="https://snapshots.opnsense.org/FreeBSD_releng/10.1/{$arch}/pfSense_HEAD/.updaters/";
$g['update_manifest']="https://updates.opnsense.org/manifest";
$g['platform'] = trim(file_get_contents("/usr/local/etc/platform")); $g['platform'] = trim(file_get_contents("/usr/local/etc/platform"));
if($g['platform'] == "nanobsd") {
$g['firmware_update_text']="OPNsense-*.img.gz";
} else {
$g['firmware_update_text']="OPNsense-*.tgz";
}
} }
/* Default sysctls */ /* Default sysctls */
......
...@@ -1909,13 +1909,6 @@ function upgrade_054_to_055() { ...@@ -1909,13 +1909,6 @@ function upgrade_054_to_055() {
$rrddbpath = "/var/db/rrd/"; $rrddbpath = "/var/db/rrd/";
$rrdtool = "/usr/local/bin/rrdtool"; $rrdtool = "/usr/local/bin/rrdtool";
if ($g['platform'] != "pfSense") {
/* restore the databases, if we have one */
if (restore_rrd()) {
/* Make sure to move the rrd backup out of the way. We will make a new one after converting. */
rename('/conf/rrd.tgz', '/conf/backup/rrd.tgz');
}
}
$rrdinterval = 60; $rrdinterval = 60;
$valid = $rrdinterval * 2; $valid = $rrdinterval * 2;
...@@ -2572,14 +2565,6 @@ function upgrade_080_to_081() { ...@@ -2572,14 +2565,6 @@ function upgrade_080_to_081() {
$rrddbpath = "/var/db/rrd/"; $rrddbpath = "/var/db/rrd/";
$rrdtool = "/usr/local/bin/rrdtool"; $rrdtool = "/usr/local/bin/rrdtool";
if ($g['platform'] != "pfSense") {
/* restore the databases, if we have one */
if (restore_rrd()) {
/* Make sure to move the rrd backup out of the way. We will make a new one after converting. */
@rename('/conf/rrd.tgz', '/conf/backup/rrd.tgz');
}
}
$rrdinterval = 60; $rrdinterval = 60;
$valid = $rrdinterval * 2; $valid = $rrdinterval * 2;
...@@ -3019,14 +3004,6 @@ function upgrade_095_to_096() { ...@@ -3019,14 +3004,6 @@ function upgrade_095_to_096() {
$rrddbpath = "/var/db/rrd"; $rrddbpath = "/var/db/rrd";
$rrdtool = "/usr/local/bin/rrdtool"; $rrdtool = "/usr/local/bin/rrdtool";
if ($g['platform'] != "pfSense") {
/* restore the databases, if we have one */
if (restore_rrd()) {
/* Make sure to move the rrd backup out of the way. We will make a new one after converting. */
rename('/conf/rrd.tgz', '/conf/backup/rrd.tgz');
}
}
/* Assume 2*10GigE for now */ /* Assume 2*10GigE for now */
$stream = 2500000000; $stream = 2500000000;
......
...@@ -32,65 +32,25 @@ require_once('guiconfig.inc'); ...@@ -32,65 +32,25 @@ require_once('guiconfig.inc');
if ($_POST) { if ($_POST) {
if (!$input_errors) { if (!$input_errors) {
if($_POST['alturlenable'] == "yes") {
$config['system']['firmware']['alturl']['enable'] = true;
$config['system']['firmware']['alturl']['firmwareurl'] = $_POST['firmwareurl'];
} else {
unset($config['system']['firmware']['alturl']['enable']);
unset($config['system']['firmware']['alturl']['firmwareurl']);
unset($config['system']['firmware']['alturl']);
unset($config['system']['firmware']);
}
if($_POST['disablecheck'] == "yes") if($_POST['disablecheck'] == "yes")
$config['system']['firmware']['disablecheck'] = true; $config['system']['firmware']['disablecheck'] = true;
else else
unset($config['system']['firmware']['disablecheck']); unset($config['system']['firmware']['disablecheck']);
if($_POST['synconupgrade'] == "yes")
$config['system']['gitsync']['synconupgrade'] = true;
else
unset($config['system']['gitsync']['synconupgrade']);
$config['system']['gitsync']['repositoryurl'] = $_POST['repositoryurl'];
$config['system']['gitsync']['branch'] = $_POST['branch'];
write_config(); write_config();
} }
} }
$curcfg = $config['system']['firmware']; $curcfg = $config['system']['firmware'];
$gitcfg = $config['system']['gitsync'];
$pgtitle = array(gettext("System"),gettext("Firmware"),gettext("Settings")); $pgtitle = array(gettext("System"),gettext("Firmware"),gettext("Settings"));
$closehead = false;
include("head.inc"); include("head.inc");
exec("/usr/bin/fetch -q -o /tmp/manifest \"{$g['update_manifest']}\"");
if (file_exists('/tmp/manifest')) {
$preset_urls_split = explode("\n", file_get_contents('/tmp/manifest'));
}
?> ?>
<body> <body>
<script type="text/javascript">
//<![CDATA[
function enable_altfirmwareurl(enable_over) {
if (document.iform.alturlenable.checked || enable_over) {
document.iform.firmwareurl.disabled = 0;
} else {
document.iform.firmwareurl.disabled = 1;
document.iform.firmwareurl.value = '';
}
}
//]]>
</script>
<?php include("fbegin.inc");?> <?php include("fbegin.inc");?>
<!-- row --> <!-- row -->
...@@ -110,58 +70,6 @@ function enable_altfirmwareurl(enable_over) { ...@@ -110,58 +70,6 @@ function enable_altfirmwareurl(enable_over) {
<form action="system_firmware_settings.php" method="post" name="iform" id="iform"> <form action="system_firmware_settings.php" method="post" name="iform" id="iform">
<table class="table table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area" style="display:none"> <!--Unsupported Feuature, hide it-->
<thead>
<tr>
<th colspan="2" valign="top" class="listtopic"><?=gettext("Firmware Branch"); ?></th>
</tr>
</thead>
<tbody>
<?php if(is_array($preset_urls_split)): ?>
<tr>
<td valign="top" class="vncell"><?=gettext("Default Auto Update URLs"); ?></td>
<td class="vtable">
<select name='preseturls' id='preseturls' onchange="firmwareurl.value = preseturls.value; document.iform.firmwareurl.disabled = 0; alturlenable.checked=true; jQuery('#preseturls').parent().effect('highlight');">
<option></option>
<?php
foreach($preset_urls_split as $pus) {
$pus_text = explode("\t", $pus);
if (empty($pus_text[0]))
continue;
if (stristr($pus_text[0], php_uname("m")) !== false) {
$style = " style=\"font-weight: bold\"";
$yourarch = " (Current architecture)";
} else {
$style = "";
$yourarch = "";
}
echo "<option value='{$pus_text[1]}'{$style}>{$pus_text[0]}{$yourarch}</option>";
}
?>
</select>
<br /><br /><?php echo sprintf(gettext("Entries denoted by \"Current architecture\" match the architecture of your current installation, such as %s. Changing architectures during an upgrade is not recommended, and may require a manual reboot after the update completes."), php_uname("m")); ?>
</td>
</tr>
<?php endif; ?>
<tr>
<td valign="top" class="vncell"><?=gettext("Firmware Auto Update URL"); ?></td>
<td class="vtable">
<input name="alturlenable" type="checkbox" id="alturlenable" value="yes" onclick="enable_altfirmwareurl()" <?php if(isset($curcfg['alturl']['enable'])) echo "checked=\"checked\""; ?> /> <?=gettext("Use an unofficial server for firmware upgrades") ?><br />
<table summary="alternative Base URL">
<tr><td><?=gettext("Base URL:"); ?></td><td><input name="firmwareurl" type="text" class="formfld url" id="firmwareurl" size="64" value="<?php if($curcfg['alturl']['firmwareurl']) echo $curcfg['alturl']['firmwareurl']; else echo $g['']; ?>" /></td></tr>
</table>
<span class="vexpl">
<?=gettext("This is where"); ?> <?php echo $g['product_name'] ?> <?=gettext("will check for newer firmware versions when the"); ?> <a href="system_firmware_check.php"><?=gettext("System: Firmware: Auto Update"); ?></a> <?=gettext("page is viewed."); ?>
<br />
<b><?=gettext("NOTE:"); ?></b> <?php printf(gettext("When a custom URL is configured, the system will not verify the image has an official digital signature")); ?>
</span>
</td>
</tr>
</tbody>
</table>
<table class="table table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <table class="table table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<thead> <thead>
<tr> <tr>
...@@ -181,79 +89,6 @@ function enable_altfirmwareurl(enable_over) { ...@@ -181,79 +89,6 @@ function enable_altfirmwareurl(enable_over) {
</tbody> </tbody>
</table> </table>
<?php if(file_exists("/usr/local/bin/git") && $g['platform'] == "pfSense"): ?>
<table class="table table-striped" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area" style="display:none"> <!--Unsupported Feuature, hide it-->
<thead>
<tr>
<th colspan="2" valign="top" class="listtopic"><?=gettext("Gitsync"); ?></th>
</tr>
</thead>
<tbody>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Auto sync on update"); ?></td>
<td width="78%" class="vtable">
<input name="synconupgrade" type="checkbox" id="synconupgrade" value="yes" <?php if (isset($gitcfg['synconupgrade'])) echo "checked=\"checked\""; ?> />
<br />
<?=gettext("After updating, sync with the following repository/branch before reboot."); ?>
</td>
</tr>
<?php
if(is_dir("/root/pfsense/pfSenseGITREPO/pfSenseGITREPO")) {
exec("cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git config remote.origin.url", $output_str);
if(is_array($output_str) && !empty($output_str[0]))
$lastrepositoryurl = $output_str[0];
unset($output_str);
}
?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Repository URL"); ?></td>
<td width="78%" class="vtable">
<input name="repositoryurl" type="text" class="formfld url" id="repositoryurl" size="64" value="<?php if ($gitcfg['repositoryurl']) echo $gitcfg['repositoryurl']; ?>" />
<?php if($lastrepositoryurl): ?>
<br />
<?=sprintf(gettext("The most recently used repository was %s"), $lastrepositoryurl); ?>
<br />
<?=gettext("This will be used if the field is left blank."); ?>
<?php endif; ?>
</td>
</tr>
<?php
if(is_dir("/root/pfsense/pfSenseGITREPO/pfSenseGITREPO")) {
exec("cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git branch", $output_str);
if(is_array($output_str)) {
foreach($output_str as $output_line) {
if(strstr($output_line, '* ')) {
$lastbranch = substr($output_line, 2);
break;
}
}
}
unset($output_str);
}
?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Branch name"); ?></td>
<td width="78%" class="vtable">
<input name="branch" type="text" class="formfld unknown" id="branch" size="64" value="<?php if ($gitcfg['branch']) echo $gitcfg['branch']; ?>" />
<?php if($lastbranch): ?>
<br />
<?=sprintf(gettext("The most recently used branch was %s"), $lastbranch); ?>
<?php else: ?>
<br />
<?=gettext("Usually the branch name is master"); ?>
<?php endif; ?>
<br />
<?=gettext("Note: Sync will not be performed if a branch is not specified."); ?>
</td>
</tr>
</tbody>
</table>
<?php endif; ?>
<table class="table table-striped __nomb" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <table class="table table-striped __nomb" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<tr> <tr>
<td width="22%" valign="top">&nbsp;</td> <td width="22%" valign="top">&nbsp;</td>
...@@ -271,10 +106,5 @@ function enable_altfirmwareurl(enable_over) { ...@@ -271,10 +106,5 @@ function enable_altfirmwareurl(enable_over) {
</div> </div>
</section> </section>
<script type="text/javascript">
//<![CDATA[
enable_altfirmwareurl();
//]]>
</script>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment