aboutsummaryrefslogtreecommitdiffstats
path: root/config/filer
diff options
context:
space:
mode:
Diffstat (limited to 'config/filer')
-rw-r--r--config/filer/filer.inc240
-rw-r--r--config/filer/filer.xml114
-rw-r--r--config/filer/filer_sync.xml89
3 files changed, 222 insertions, 221 deletions
diff --git a/config/filer/filer.inc b/config/filer/filer.inc
index b89553e4..3a012dd2 100644
--- a/config/filer/filer.inc
+++ b/config/filer/filer.inc
@@ -1,194 +1,191 @@
<?php
-/* ========================================================================== */
-/*
- filerinc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2010 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2012 Marcello Coutinho
- Copyright (C) 2012 Brian Scholer
- 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.
- */
+ filer.inc
+ part of pfSense (https://www.pfsense.org/)
+ Copyright (C) 2010 Scott Ullrich <sullrich@gmail.com>
+ Copyright (C) 2012 Marcello Coutinho
+ Copyright (C) 2012 Brian Scholer
+ 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.
+*/
/* ========================================================================== */
-
-
-function filer_install() {
- // reserved
+function filer_text_area_decode($text) {
+ return preg_replace('/\r\n/', "\n", base64_decode($text));
}
-function filer_deinstall() {
- // reserved
-}
-
-function filer_start() {
- global $g, $config;
-
- // reserved
-}
-
-function filer_text_area_decode($text){
- return preg_replace('/\r\n/', "\n",base64_decode($text));
-}
function sync_package_filer() {
global $config, $g;
- $update_conf=0;
- #mount filesystem writeable
+ $update_conf = 0;
+
conf_mount_rw();
-
- #loop on configured files
- if($config['installedpackages']['filer']['config']!="") {
- $count=0;
- foreach($config['installedpackages']['filer']['config'] as $file) {
- if ($file['filedata']=="" && file_exists($file['fullfile'])){
- $config['installedpackages']['filer']['config'][$count]['filedata']=base64_encode(file_get_contents($file['fullfile']));
- $file['filedata']=base64_encode(file_get_contents($file['fullfile']));
+
+ /* Loop on configured files. */
+ if ($config['installedpackages']['filer']['config'] != "") {
+ $count = 0;
+ foreach ($config['installedpackages']['filer']['config'] as $file) {
+ if ($file['filedata']=="" && file_exists($file['fullfile'])) {
+ $config['installedpackages']['filer']['config'][$count]['filedata'] = base64_encode(file_get_contents($file['fullfile']));
+ $file['filedata'] = base64_encode(file_get_contents($file['fullfile']));
$update_conf++;
- }
+ }
$count++;
- if(preg_match("/0?[0-7]{3}/", $file['mod']))
+ if (preg_match("/0?[0-7]{3}/", $file['mod'])) {
$mod = octdec($file['mod']);
- else
- $mod = 0700;
-
- #write file
- file_put_contents($file['fullfile'], filer_text_area_decode($file['filedata']),LOCK_EX);
+ } else {
+ $mod = 0644;
+ }
+
+ /* Write file. */
+ file_put_contents($file['fullfile'], filer_text_area_decode($file['filedata']), LOCK_EX);
chmod($file['fullfile'], $mod);
-
- #check if there is a script to run after file save
- if($file['cmd']!= "")
- switch ($file['background']){
+
+ /* Check if there is a script to run after file save. */
+ if ($file['cmd'] != "") {
+ switch ($file['background']) {
case "background":
mwexec_bg($file['cmd']);
break;
case "foreground":
mwexec($file['cmd']);
- break;
+ break;
}
-
+ }
}
- #Write config if any file from filesystem was loaded
- if ($update_conf > 0)
- write_config();
+ /* Write config if any file from filesystem was loaded. */
+ if ($update_conf > 0) {
+ write_config();
+ }
}
- #mount filesystem readonly
+
conf_mount_ro();
-
+
filer_sync_on_changes();
}
function filer_validate_input($post, &$input_errors) {
foreach ($post as $key => $value) {
- if (empty($value))
+ if (empty($value)) {
continue;
- if (substr($key, 0, 3) == "mod" && !preg_match("/^0?[0-7]{3}$/", $value))
- $input_errors[] = "{$value} is valid permission number";
- if (substr($key, 0, 11) == "description" && !preg_match("@^[a-zA-Z0-9 _/.-]+$@", $value))
- $input_errors[] = "Do not use special characters on description";
- if (substr($key, 0, 8) == "fullfile" && !preg_match("@^[a-zA-Z0-9_/.-]+$@", $value))
- $input_errors[] = "Do not use special characters on filename";
-
+ }
+ if (substr($key, 0, 3) == "mod" && !preg_match("/^0?[0-7]{3}$/", $value)) {
+ $input_errors[] = "{$value} is not valid permissions mode number.";
+ }
+ if (substr($key, 0, 11) == "description" && !preg_match("@^[a-zA-Z0-9 _/.-]+$@", $value)) {
+ $input_errors[] = "Do not use special characters in description.";
+ }
+ if (substr($key, 0, 8) == "fullfile" && !preg_match("@^[a-zA-Z0-9_/.-]+$@", $value)) {
+ $input_errors[] = "Do not use special characters in filename.";
+ }
}
}
-/* Uses XMLRPC to synchronize the changes to a remote node */
+/* Uses XMLRPC to synchronize the changes to a remote node. */
function filer_sync_on_changes() {
global $config, $g;
-
+
log_error("[filer] filer_xmlrpc_sync.php is starting.");
- $synconchanges = $config['installedpackages']['filersync']['config'][0]['synconchanges'];
- if(!$synconchanges)
+ $synconchanges = $config['installedpackages']['filersync']['config'][0]['synconchanges'];
+ if (!$synconchanges) {
return;
- foreach ($config['installedpackages']['filersync']['config'] as $rs ){
- foreach($rs['row'] as $sh){
+ }
+ foreach ($config['installedpackages']['filersync']['config'] as $rs) {
+ foreach ($rs['row'] as $sh) {
$sync_to_ip = $sh['ipaddress'];
$password = $sh['password'];
- if($sh['username'])
+ if ($sh['username']) {
$username = $sh['username'];
- else
+ } else {
$username = 'admin';
- if($password && $sync_to_ip)
+ }
+ if ($password && $sync_to_ip) {
filer_do_xmlrpc_sync($sync_to_ip, $username, $password);
}
+ }
}
log_error("[filer] filer_xmlrpc_sync.php is ending.");
}
-/* Do the actual XMLRPC sync */
+
+/* Do the actual XMLRPC sync. */
function filer_do_xmlrpc_sync($sync_to_ip, $username, $password) {
global $config, $g;
- if(!$username)
+ if (!$username) {
return;
-
- if(!$password)
+ }
+
+ if (!$password) {
return;
+ }
- if(!$sync_to_ip)
+ if (!$sync_to_ip) {
return;
+ }
$xmlrpc_sync_neighbor = $sync_to_ip;
- if($config['system']['webgui']['protocol'] != "") {
+ if ($config['system']['webgui']['protocol'] != "") {
$synchronizetoip = $config['system']['webgui']['protocol'];
$synchronizetoip .= "://";
- }
- $port = $config['system']['webgui']['port'];
- /* if port is empty lets rely on the protocol selection */
- if($port == "") {
- if($config['system']['webgui']['protocol'] == "http")
+ }
+ $port = $config['system']['webgui']['port'];
+ /* If port is empty, let's rely on the protocol selection. */
+ if ($port == "") {
+ if ($config['system']['webgui']['protocol'] == "http") {
$port = "80";
- else
+ } else {
$port = "443";
- }
+ }
+ }
$synchronizetoip .= $sync_to_ip;
- /* xml will hold the sections to sync */
+ /* xml will hold the sections to sync. */
$xml = array();
$xml['filer'] = $config['installedpackages']['filer'];
-
- /* assemble xmlrpc payload */
+
+ /* Assemble XMLRPC payload. */
$params = array(
XML_RPC_encode($password),
XML_RPC_encode($xml)
);
- /* set a few variables needed for sync code borrowed from filter.inc */
+ /* Set a few variables needed for sync; code borrowed from filter.inc. */
$url = $synchronizetoip;
log_error("Beginning Filer XMLRPC sync to {$url}:{$port}.");
$method = 'pfsense.merge_installedpackages_section_xmlrpc';
$msg = new XML_RPC_Message($method, $params);
$cli = new XML_RPC_Client('/xmlrpc.php', $url, $port);
$cli->setCredentials($username, $password);
- if($g['debug'])
+ if ($g['debug']) {
$cli->setDebug(1);
- /* send our XMLRPC message and timeout after 250 seconds */
+ }
+ /* Send our XMLRPC message and timeout after 250 seconds. */
$resp = $cli->send($msg, "250");
- if(!$resp) {
+ if (!$resp) {
$error = "A communications error occurred while attempting filer XMLRPC sync with {$url}:{$port}.";
log_error($error);
file_notice("sync_settings", $error, "filer Settings Sync", "");
- } elseif($resp->faultCode()) {
+ } elseif ($resp->faultCode()) {
$cli->setDebug(1);
$resp = $cli->send($msg, "250");
$error = "An error code was received while attempting filer XMLRPC sync with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString();
@@ -197,27 +194,27 @@ function filer_do_xmlrpc_sync($sync_to_ip, $username, $password) {
} else {
log_error("filer XMLRPC sync successfully completed with {$url}:{$port}.");
}
-
- /* tell filer to reload our settings on the destionation sync host. */
+
+ /* Tell filer to reload our settings on the destination sync host. */
$method = 'pfsense.exec_php';
- $execcmd = "require_once('/usr/local/pkg/filer.inc');\n";
+ $execcmd = "require_once('/usr/local/pkg/filer.inc');\n";
$execcmd .= "sync_package_filer();";
- /* assemble xmlrpc payload */
+ /* Assemble XMLRPC payload. */
$params = array(
XML_RPC_encode($password),
XML_RPC_encode($execcmd)
);
-
+
log_error("filer XMLRPC reload data {$url}:{$port}.");
$msg = new XML_RPC_Message($method, $params);
$cli = new XML_RPC_Client('/xmlrpc.php', $url, $port);
$cli->setCredentials($username, $password);
$resp = $cli->send($msg, "250");
- if(!$resp) {
+ if (!$resp) {
$error = "A communications error occurred while attempting filer XMLRPC sync with {$url}:{$port} (pfsense.exec_php).";
log_error($error);
file_notice("sync_settings", $error, "filer Settings Sync", "");
- } elseif($resp->faultCode()) {
+ } elseif ($resp->faultCode()) {
$cli->setDebug(1);
$resp = $cli->send($msg, "250");
$error = "An error code was received while attempting filer XMLRPC sync with {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString();
@@ -226,7 +223,6 @@ function filer_do_xmlrpc_sync($sync_to_ip, $username, $password) {
} else {
log_error("filer XMLRPC reload data success with {$url}:{$port} (pfsense.exec_php).");
}
-
}
?>
diff --git a/config/filer/filer.xml b/config/filer/filer.xml
index 71821067..ab49bb21 100644
--- a/config/filer/filer.xml
+++ b/config/filer/filer.xml
@@ -1,59 +1,58 @@
<?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[
-/* ========================================================================== */
+ <copyright>
+ <![CDATA[
+/* $Id$ */
+/* ====================================================================================== */
/*
- filer.xml
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2010 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2011 Brian Scholer
- Copyright (C) 2012 Marcello Coutinho
- All rights reserved.
+ filer.xml
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2010 Scott Ullrich <sullrich@gmail.com>
+ Copyright (C) 2011 Brian Scholer
+ Copyright (C) 2012 Marcello Coutinho
+ 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:
+ 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.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
- 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.
- */
-/* ========================================================================== */
- ]]>
- </copyright>
- <description>Describe your package here</description>
- <requirements>Describe your package requirements here</requirements>
- <faq>Currently there are no FAQ items provided.</faq>
+ 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.
+*/
+/* ====================================================================================== */
+ ]]>
+ </copyright>
<name>filer</name>
- <version>0.60.1</version>
+ <version>0.60.2</version>
<title>Filer</title>
<include_file>/usr/local/pkg/filer.inc</include_file>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/filer/filer.inc</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/filer/filer_sync.xml</item>
</additional_files_needed>
<menu>
@@ -73,7 +72,6 @@
<url>/pkg_edit.php?xml=filer_sync.xml</url>
</tab>
</tabs>
-
<adddeleteeditpagefields>
<columnitem>
<fielddescr>File</fielddescr>
@@ -99,7 +97,7 @@
<fieldname>fullfile</fieldname>
<type>input</type>
<size>60</size>
- <description>Enter Full file path</description>
+ <description>Enter full file path.</description>
<required/>
</field>
<field>
@@ -107,6 +105,7 @@
<fieldname>description</fieldname>
<description>Enter a description for this file.</description>
<type>input</type>
+ <typehint>(Not parsed -- this is for your reference only.)</typehint>
<size>60</size>
</field>
<field>
@@ -114,7 +113,7 @@
<fieldname>mod</fieldname>
<type>input</type>
<size>10</size>
- <description><![CDATA[Enter file permission you want on this file<br>Blank leaves the permissions alone.]]></description>
+ <description><![CDATA[Enter file permission you want on this file<br />If left blank, default file permissions (0644) will be used.]]></description>
</field>
<field>
<fielddescr>File Contents</fielddescr>
@@ -129,32 +128,37 @@
<field>
<type>listtopic</type>
<fieldname>temp</fieldname>
- <name>cmd to run after file save/sync</name>
+ <name>Command to run after file save/sync.</name>
</field>
<field>
- <fielddescr>script</fielddescr>
+ <fielddescr>Script/Command</fielddescr>
<fieldname>cmd</fieldname>
- <description>Enter script or cmd to run after file save/sync</description>
+ <description>Enter script or command to run after file save/sync.</description>
<type>input</type>
+ <typehint>(Optional. If using a custom script, it must have executable bit set.)</typehint>
<size>60</size>
</field>
<field>
- <fielddescr>execute mode</fielddescr>
+ <fielddescr>Execute mode</fielddescr>
<fieldname>background</fieldname>
<type>select</type>
<options>
- <option><name>Background (default)</name><value>background</value></option>
- <option><name>Foreground</name><value>foreground</value></option>
- <option><name>Do not run this script</name><value>disabled</value></option>
+ <option>
+ <name>Background (default)</name>
+ <value>background</value>
+ </option>
+ <option>
+ <name>Foreground</name>
+ <value>foreground</value>
+ </option>
+ <option>
+ <name>Do not run this script</name>
+ <value>disabled</value>
+ </option>
</options>
<description>Choose the way script will run.</description>
</field>
</fields>
- <custom_php_install_command>
- filer_install();
- </custom_php_install_command>
- <custom_php_command_before_form>
- </custom_php_command_before_form>
<custom_php_validation_command>
filer_validate_input($_POST, $input_errors);
</custom_php_validation_command>
@@ -164,4 +168,4 @@
<custom_php_resync_config_command>
sync_package_filer();
</custom_php_resync_config_command>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/config/filer/filer_sync.xml b/config/filer/filer_sync.xml
index c51bae86..0b4124ce 100644
--- a/config/filer/filer_sync.xml
+++ b/config/filer/filer_sync.xml
@@ -2,48 +2,49 @@
<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
- <copyright>
- <![CDATA[
-/* ========================================================================== */
+ <copyright>
+ <![CDATA[
+/* $Id$ */
+/* ====================================================================================== */
/*
- filer_sync.xml
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2008 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2011 Brian Scholer
- Copyright (C) 2012 Marcello Coutinho
- All rights reserved.
- */
-/* ========================================================================== */
+ filer_sync.xml
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2010 Scott Ullrich <sullrich@gmail.com>
+ Copyright (C) 2011 Brian Scholer
+ Copyright (C) 2012 Marcello Coutinho
+ 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:
+ 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.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
- 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.
- */
-/* ========================================================================== */
- ]]>
- </copyright>
- <description>Describe your package here</description>
- <requirements>Describe your package requirements here</requirements>
- <faq>Currently there are no FAQ items provided.</faq>
+ 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.
+*/
+/* ====================================================================================== */
+ ]]>
+ </copyright>
<name>filersync</name>
- <version>1.1</version>
+ <version>1.2</version>
<title>Filer: Sync</title>
<include_file>/usr/local/pkg/filer.inc</include_file>
<tabs>
@@ -62,11 +63,11 @@
<type>listtopic</type>
<fieldname>temp</fieldname>
<name>Enable Filer configuration sync</name>
- </field>
+ </field>
<field>
- <fielddescr>Automatically sync Filer configuration changes</fielddescr>
+ <fielddescr>Automatically sync Filer configuration changes.</fielddescr>
<fieldname>synconchanges</fieldname>
- <description>pfSense will automatically sync changes to the hosts defined below. Blank user assumes 'admin'.</description>
+ <description>pfSense will automatically sync changes to the hosts defined below. (Leave blank to use 'admin'.)</description>
<type>checkbox</type>
</field>
<field>
@@ -77,7 +78,7 @@
<rowhelperfield>
<fielddescr>IP Address</fielddescr>
<fieldname>ipaddress</fieldname>
- <description>IP Address of remote server</description>
+ <description>IP Address of remote server.</description>
<type>input</type>
<size>20</size>
<required/>
@@ -85,7 +86,7 @@
<rowhelperfield>
<fielddescr>User Name</fielddescr>
<fieldname>username</fieldname>
- <description>user name of remote server</description>
+ <description>user name of remote server.</description>
<type>input</type>
<size>20</size>
</rowhelperfield>
@@ -101,9 +102,9 @@
</field>
</fields>
<custom_php_resync_config_command>
- filer_sync_on_changes();
+ filer_sync_on_changes();
</custom_php_resync_config_command>
- <custom_php_command_before_form>
+ <custom_php_command_before_form>
unset($_POST['temp']);
</custom_php_command_before_form>
-</packagegui> \ No newline at end of file
+</packagegui>