summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-02-22 09:43:23 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-02-22 09:43:23 -0300
commitdc2e5552a258a74355749b759359c0df5934c445 (patch)
treeb3f5d95f0b34cf287b8ce5064d5a34167edd26d6 /etc/inc
parentfb6a3e7a1a75e8c647cfa7aaab550751fbcf1db5 (diff)
downloadpfsense-dc2e5552a258a74355749b759359c0df5934c445.zip
pfsense-dc2e5552a258a74355749b759359c0df5934c445.tar.gz
simplify logic a bit
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/interfaces.inc6
1 files 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);
OpenPOWER on IntegriCloud