diff options
author | Chris Buechler <cmb@pfsense.org> | 2015-11-14 23:59:00 -0600 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2015-11-14 23:59:00 -0600 |
commit | 1300905cdad5406847b3c01642589f4c5ca4a6a3 (patch) | |
tree | ecdb7dd4b671a711758056c4c3563b152f9701da /config/netio/netio.xml | |
parent | 8e9c2c3e8a9ffec1ba405810338f36e1d0d9637b (diff) | |
parent | a1d5c2f568c0cefa4b2f5117658b81cb9534df39 (diff) | |
download | pfsense-packages-1300905cdad5406847b3c01642589f4c5ca4a6a3.tar.gz pfsense-packages-1300905cdad5406847b3c01642589f4c5ca4a6a3.tar.bz2 pfsense-packages-1300905cdad5406847b3c01642589f4c5ca4a6a3.zip |
Merge pull request #1155 from doktornotor/patch-11
Diffstat (limited to 'config/netio/netio.xml')
-rw-r--r-- | config/netio/netio.xml | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/config/netio/netio.xml b/config/netio/netio.xml index 34f188c2..3bb079d8 100644 --- a/config/netio/netio.xml +++ b/config/netio/netio.xml @@ -42,16 +42,21 @@ ]]> </copyright> <name>netio</name> - <version>1.27</version> - <title>netio: Client</title> + <version>1.28</version> + <title>Diagnostics: netio: Client</title> + <savetext>Run netio client</savetext> <preoutput>yes</preoutput> <donotsave>true</donotsave> <menu> <name>netio</name> - <tooltiptext>Run netio in client or server mode.</tooltiptext> <section>Diagnostics</section> - <configfile>netio.xml</configfile> + <url>/pkg_edit.php?xml=netio.xml</url> </menu> + <service> + <name>netio</name> + <executable>netio</executable> + <description>netio Network Throughput Benchmark Server/Client</description> + </service> <tabs> <tab> <text>Client</text> @@ -64,6 +69,11 @@ </tab> </tabs> <additional_files_needed> + <prefix>/etc/inc/priv/</prefix> + <item>https://packages.pfsense.org/packages/config/netio/netio.priv.inc</item> + </additional_files_needed> + <additional_files_needed> + <prefix>/usr/local/pkg/</prefix> <item>https://packages.pfsense.org/packages/config/netio/netioserver.xml</item> </additional_files_needed> <fields> @@ -78,16 +88,17 @@ <fieldname>port</fieldname> <description>Enter the port that netio will connect to. (Default: 18767)</description> <type>input</type> + <default_value>18767</default_value> </field> </fields> <custom_add_php_command> <![CDATA[ mwexec("/usr/bin/killall netio"); - $netio_options = ""; - if ($_POST['port'] != "") { - $netio_options .= " -p {$_POST['port']}"; - $netio_options .= $_POST['hostname']; - system("/usr/local/bin/netio " . $netio_options); + if ($_POST['port'] != "" && $_POST['hostname'] != "") { + $port = escapeshellarg($_POST['port']); + $hostname = escapeshellarg($_POST['hostname']); + $netio_options = "-p {$port} {$hostname}"; + system("/usr/local/bin/netio {$netio_options}"); } ]]> </custom_add_php_command> |