aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-11-14 23:59:10 -0600
committerChris Buechler <cmb@pfsense.org>2015-11-14 23:59:10 -0600
commit3f7d124b1434945d8df87523b0e7a2d25627016f (patch)
treeef3d1b8ff5c703133165d2ff296547c7e2250e39 /config
parent1300905cdad5406847b3c01642589f4c5ca4a6a3 (diff)
parent7251b97b336e9900bc7604564353f28f6e0a9d57 (diff)
downloadpfsense-packages-3f7d124b1434945d8df87523b0e7a2d25627016f.tar.gz
pfsense-packages-3f7d124b1434945d8df87523b0e7a2d25627016f.tar.bz2
pfsense-packages-3f7d124b1434945d8df87523b0e7a2d25627016f.zip
Merge pull request #1154 from doktornotor/patch-10
Diffstat (limited to 'config')
-rw-r--r--config/mtr-nox11/mtr-nox11.priv.inc37
-rw-r--r--config/mtr-nox11/mtr-nox11.xml28
2 files changed, 50 insertions, 15 deletions
diff --git a/config/mtr-nox11/mtr-nox11.priv.inc b/config/mtr-nox11/mtr-nox11.priv.inc
new file mode 100644
index 00000000..22e2488c
--- /dev/null
+++ b/config/mtr-nox11/mtr-nox11.priv.inc
@@ -0,0 +1,37 @@
+<?php
+/*
+ mtr-nox11.priv.inc
+ part of pfSense (http://www.pfSense.org/)
+ Copyright (C) 2015 ESF, LLC
+ 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.
+*/
+global $priv_list;
+
+$priv_list['page-diagnostics-mtr-nox11'] = array();
+$priv_list['page-diagnostics-mtr-nox11']['name'] = "WebCfg - Diagnostics: mtr-nox11";
+$priv_list['page-diagnostics-mtr-nox11']['descr'] = "Allow access to mtr-nox11 package GUI";
+$priv_list['page-diagnostics-mtr-nox11']['match'] = array();
+$priv_list['page-diagnostics-mtr-nox11']['match'][] = "pkg_edit.php?xml=mtr-nox11.xml*";
+
+?>
diff --git a/config/mtr-nox11/mtr-nox11.xml b/config/mtr-nox11/mtr-nox11.xml
index 396e860d..133f61f2 100644
--- a/config/mtr-nox11/mtr-nox11.xml
+++ b/config/mtr-nox11/mtr-nox11.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
-<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
+<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
+<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
<![CDATA[
@@ -8,7 +8,7 @@
/* ====================================================================================== */
/*
mtr-nox11.xml
- part of pfSense (http://www.pfSense.com)
+ part of pfSense (https://www.pfSense.org/)
Copyright (C) 2014-2015 ESF, LLC
All rights reserved.
*/
@@ -40,23 +40,21 @@
/* ====================================================================================== */
]]>
</copyright>
- <description>Describe your package here</description>
- <requirements>Describe your package requirements here</requirements>
- <faq>Currently there are no FAQ items provided.</faq>
<name>mtr</name>
- <version>0.85_3</version>
+ <version>0.85.4</version>
<title>Diagnostics: mtr</title>
<savetext>Run mtr</savetext>
<preoutput>yes</preoutput>
- <!-- Invokes a simple input menu and will not update the configuration database. -->
<donotsave>true</donotsave>
- <!-- Menu is where this packages menu will appear -->
<menu>
<name>mtr</name>
- <tooltiptext>mtr combines the functionality of the "traceroute" and "ping" programs into a single network diagnostic tool</tooltiptext>
<section>Diagnostics</section>
- <configfile>mtr-nox11.xml</configfile>
+ <url>/pkg_edit.php?xml=mtr-nox11.xml</url>
</menu>
+ <additional_files_needed>
+ <prefix>/etc/inc/priv/</prefix>
+ <item>https://packages.pfsense.org/packages/config/mtr-nox11/mtr-nox11.priv.inc</item>
+ </additional_files_needed>
<fields>
<field>
<fielddescr>IP or Hostname</fielddescr>
@@ -70,7 +68,7 @@
<fieldname>count</fieldname>
<description>This is the number of pings to send, each one takes 1 second.</description>
<type>input</type>
- <typehint>(Defaults to 10)</typehint>
+ <typehint>(Defaults to 10.)</typehint>
</field>
<field>
<fielddescr>No DNS Lookup</fielddescr>
@@ -111,8 +109,8 @@
$int_interval = (is_numeric($_POST['interval']) ? (abs(intval($_POST['interval']))) : 1);
if (!is_hostname($_POST['hostname']) && !is_ipaddr($_POST['hostname'])) {
- echo "<div class=\"errmsg\">ERROR: No valid IP or Hostname given. Fix this and try again!</div>";
- echo "\n<input class=\"formbtn\" type=\"button\" value=\"Back to mtr\" onclick=\"history.back()\">";
+ echo "<strong><span class='errmsg'>ERROR:</span> No valid IP or Hostname given. Fix this and try again!</strong>\n";
+ echo "\n<input class='formbtn' type='button' value='Back to mtr' onclick='history.back()'>";
die();
}
@@ -136,7 +134,7 @@
$mtr_options .= " " . $_POST['hostname'];
echo "Running mtr $mtr_options:\n\n";
system("/usr/local/sbin/mtr" . $mtr_options);
- echo "\n<input class=\"formbtn\" type=\"button\" value=\"Back to mtr\" onclick=\"history.back()\">";
+ echo "\n<input class='formbtn' type='button' value='Back to mtr' onclick='history.back()'>";
]]>
</custom_add_php_command>
</packagegui>