From dc2e5552a258a74355749b759359c0df5934c445 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 22 Feb 2013 09:43:23 -0300 Subject: simplify logic a bit --- etc/inc/interfaces.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 1b53b5f..cb1efb8 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1856,9 +1856,11 @@ function interfaces_carp_setup() { /* setup pfsync interface */ if ($carp_sync_int and $pfsyncenabled) { if (is_ipaddr($pfsyncpeerip)) - mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} syncpeer {$pfsyncpeerip} up", false); + $syncpeer = "syncpeer {$pfsyncpeerip}"; else - mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} -syncpeer up", false); + $syncpeer = "-syncpeer"; + + mwexec("/sbin/ifconfig pfsync0 syncdev {$carp_sync_int} {$syncpeer} up", false); sleep(1); -- cgit v1.1