aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-11-05 16:50:23 -0200
committerRenato Botelho <renato@netgate.com>2015-11-05 16:50:23 -0200
commita616f7a7ce42c8c5bcf30fe2e6cad8f4d5403599 (patch)
treeeca53143c232e667176fe6434438261f530efe20 /config
parentba5064d40f6691089af307ecdb54b0b41453852e (diff)
parentd70d488f5d9427dc97b7be5a00f59f26315230c4 (diff)
downloadpfsense-packages-RELENG_2_2_5.tar.gz
pfsense-packages-RELENG_2_2_5.tar.bz2
pfsense-packages-RELENG_2_2_5.zip
Merge pull request #1135 from PiBa-NL/haproxy_pkg0.32RELENG_2_2_5
Diffstat (limited to 'config')
-rw-r--r--config/haproxy-devel/haproxy.xml2
-rw-r--r--config/haproxy-devel/pkg/haproxy.inc15
-rw-r--r--config/haproxy-devel/www/haproxy_listeners_edit.php1
-rw-r--r--config/haproxy-devel/www/haproxy_pool_edit.php5
4 files changed, 19 insertions, 4 deletions
diff --git a/config/haproxy-devel/haproxy.xml b/config/haproxy-devel/haproxy.xml
index 784e0034..19b6b577 100644
--- a/config/haproxy-devel/haproxy.xml
+++ b/config/haproxy-devel/haproxy.xml
@@ -42,7 +42,7 @@
]]>
</copyright>
<name>haproxy</name>
- <version>0.32</version>
+ <version>0.33</version>
<title>HAProxy</title>
<aftersaveredirect>/pkg_edit.php?xml=haproxy_pools.php</aftersaveredirect>
<include_file>/usr/local/pkg/haproxy.inc</include_file>
diff --git a/config/haproxy-devel/pkg/haproxy.inc b/config/haproxy-devel/pkg/haproxy.inc
index 638ece28..3d614fe0 100644
--- a/config/haproxy-devel/pkg/haproxy.inc
+++ b/config/haproxy-devel/pkg/haproxy.inc
@@ -766,7 +766,8 @@ function write_backend($configpath, $fd, $name, $pool, $backendsettings) {
$backend_mode = $frontendtype;
}
fwrite ($fd, "\tmode\t\t\t" . $backend_mode . "\n");
-
+ fwrite ($fd, "\tlog\t\t\tglobal\n");
+
$use_haproxyresolvers = false;
if (haproxy_version() >= '1.6') {
$use_mailers = is_array($a_mailers) && count($a_mailers) > 0;
@@ -1460,6 +1461,18 @@ function haproxy_writeconf($configpath) {
$a_mailers = &$config['installedpackages']['haproxy']['email_mailers']['item'];
$a_resolvers = &$config['installedpackages']['haproxy']['dns_resolvers']['item'];
$a_files = &$config['installedpackages']['haproxy']['files']['item'];
+ if (!is_array($a_frontends)) {
+ $a_frontends = array();
+ }
+ if (!is_array($a_backends)) {
+ $a_backends = array();
+ }
+ if (!is_array($a_mailers)) {
+ $a_mailers = array();
+ }
+ if (!is_array($a_resolvers)) {
+ $a_resolvers = array();
+ }
$fd = fopen($configfile, "w");
if (is_array($a_global)) {
diff --git a/config/haproxy-devel/www/haproxy_listeners_edit.php b/config/haproxy-devel/www/haproxy_listeners_edit.php
index 9d2b0b05..8e6c1c3d 100644
--- a/config/haproxy-devel/www/haproxy_listeners_edit.php
+++ b/config/haproxy-devel/www/haproxy_listeners_edit.php
@@ -283,6 +283,7 @@ if (isset($id) && $a_backend[$id]) {
if (isset($_GET['dup'])) {
unset($id);
+ $pconfig['name'] .= "-copy";
if ($pconfig['secondary'] != 'yes')
$pconfig['primary_frontend'] = $pconfig['name'];
}
diff --git a/config/haproxy-devel/www/haproxy_pool_edit.php b/config/haproxy-devel/www/haproxy_pool_edit.php
index 71da9732..2b4787f3 100644
--- a/config/haproxy-devel/www/haproxy_pool_edit.php
+++ b/config/haproxy-devel/www/haproxy_pool_edit.php
@@ -323,9 +323,10 @@ if (isset($id) && $a_pools[$id]) {
}
}
-if (isset($_GET['dup']))
+if (isset($_GET['dup'])) {
unset($id);
-
+ $pconfig['name'] .= "-copy";
+}
$changedesc = "Services: HAProxy: Backend server pool: ";
$changecount = 0;