diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-02-22 09:43:23 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-02-22 09:43:23 -0300 |
commit | dc2e5552a258a74355749b759359c0df5934c445 (patch) | |
tree | b3f5d95f0b34cf287b8ce5064d5a34167edd26d6 | |
parent | fb6a3e7a1a75e8c647cfa7aaab550751fbcf1db5 (diff) | |
download | pfsense-dc2e5552a258a74355749b759359c0df5934c445.zip pfsense-dc2e5552a258a74355749b759359c0df5934c445.tar.gz |
simplify logic a bit
-rw-r--r-- | etc/inc/interfaces.inc | 6 |
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); |