From 92b27ea16b91c7fa91b8b4d420b7597801c0a889 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 22 Feb 2013 09:34:23 -0300 Subject: Fixes on HA setup: - Disable pfsync when it's disabled on GUI - Remove syncpeer and back it to default multicast address when it's removed from conf Fixes #2491 --- etc/inc/interfaces.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 27f1158..1f6b061 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1666,7 +1666,7 @@ function interfaces_carp_setup() { if (is_ipaddr($pfsyncpeerip)) mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} syncpeer {$pfsyncpeerip} up", false); else - mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} up", false); + mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} -syncpeer up", false); sleep(1); @@ -1678,6 +1678,10 @@ function interfaces_carp_setup() { $i++; sleep(1); } + log_error("pfsync done in $i seconds."); + log_error("Configuring CARP settings finalize..."); + } else { + mwexec("/sbin/ifconfig pfsync0 -syncdev -syncpeer", false); } if ($config['virtualip']['vip']) -- cgit v1.1