diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2012-09-25 22:51:26 +0200 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2012-09-25 22:54:53 +0200 |
commit | 1be1a67a3941de56e6fc80db1d1ee21f6e9c4fce (patch) | |
tree | 34659a1fe3f01da4f7ad1495efca8eeb7def67d3 | |
parent | 26a5f8c8ee3caf6941bc051c529a1f61f56f60db (diff) | |
download | pfsense-1be1a67a3941de56e6fc80db1d1ee21f6e9c4fce.zip pfsense-1be1a67a3941de56e6fc80db1d1ee21f6e9c4fce.tar.gz |
while booting do not let carp wait for pfsync synchronization if pfsync is not enabled
-rw-r--r-- | etc/inc/interfaces.inc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index ec6e9cf..a7af3ce 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1816,10 +1816,15 @@ function interfaces_carp_setup() { /* XXX: Handle an issue with pfsync(4) and carp(4). In a cluster carp will come up before pfsync(4) has updated and so will cause issues * for existing sessions. */ - $i = 0; - while (intval(trim(`/sbin/ifconfig pfsync0 | /usr/bin/grep 'syncok: 0' | /usr/bin/grep -v grep | /usr/bin/wc -l`)) == 0 && $i < 30) { - $i++; - sleep(1); + if ($config['hasync']['pfsyncenabled'] === "on"){ + echo "waiting for pfsync..."; + $i = 0; + while (intval(trim(`/sbin/ifconfig pfsync0 | /usr/bin/grep 'syncok: 0' | /usr/bin/grep -v grep | /usr/bin/wc -l`)) == 0 && $i < 30) { + $i++; + sleep(1); + } + echo "pfsync done in $i seconds.\n"; + echo "Configuring CARP settings finalize..."; } if($config['virtualip']['vip']) |