From 012cd354237bda4768a7cd62ad902f0841fb78bb Mon Sep 17 00:00:00 2001 From: thompsa Date: Fri, 5 Mar 2010 13:30:18 +1300 Subject: Make the acl name unique by prefixing with _ --- config/haproxy-dev/haproxy.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc index 12920103..4207a3ca 100644 --- a/config/haproxy-dev/haproxy.inc +++ b/config/haproxy-dev/haproxy.inc @@ -374,6 +374,7 @@ function haproxy_configure() { fwrite ($fd, "\tdefault_backend\t\t" . $bind['defaultpool'] . "\n"); // Combine the rest of the listener configs + $i = 0; foreach ($bind['config'] as $bconfig) { $a_acl=&$bconfig['ha_acls']['item']; if(!is_array($a_acl)) @@ -400,8 +401,10 @@ function haproxy_configure() { else $expr = $entry['expression'] . " " . $entry['value']; - fwrite ($fd, "\tacl\t\t\t".$entry['name']."\t".$expr."\n"); - fwrite ($fd, "\tuse_backend\t\t$poolname if " . $entry['name'] . "\n"); + $aclname = $i . "_" . $entry['name']; + fwrite ($fd, "\tacl\t\t\t" . $aclname . "\t" . $expr . "\n"); + fwrite ($fd, "\tuse_backend\t\t" . $poolname . " if " . $aclname . "\n"); + $i++; } } -- cgit v1.2.3