diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-03-11 23:19:05 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-03-11 23:19:05 +0000 |
commit | 5f838ec30ffbe2531c4cd61cbefa05f1c9826cac (patch) | |
tree | cd215b01d290495a0b56844eca36db68468ac05f /packages | |
parent | a9508449e57d18efd90f45d540739befbfcc6d68 (diff) | |
download | pfsense-packages-5f838ec30ffbe2531c4cd61cbefa05f1c9826cac.tar.gz pfsense-packages-5f838ec30ffbe2531c4cd61cbefa05f1c9826cac.tar.bz2 pfsense-packages-5f838ec30ffbe2531c4cd61cbefa05f1c9826cac.zip |
Do not foreach carpsettings if the user has not visited the carp settings tab.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/carp.xml | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/packages/carp.xml b/packages/carp.xml index 453f21fb..5b53ddfe 100644 --- a/packages/carp.xml +++ b/packages/carp.xml @@ -231,21 +231,22 @@ $carp_instances_counter++; } } - foreach($config['installedpackages']['carpsettings']['config'] as $carp) - if($carp['pfsyncenabled'] != "") { - $pfsync = 1; - if($carp['premption'] != "") - $preempt = 1; - if($carp['balancing'] != "") - $using_arp_balance = 1; - $carp_sync_int = convert_friendly_interface_to_real_interface_name($carp['pfsyncinterface']); - $carp_sync_ip = $carp['pfsyncip']; - fwrite($fout, "/sbin/ifconfig pfsync0 create\n"); - fwrite($fout, "/sbin/ifconfig pfsync0 {$carp_sync_ip}/24\n"); - fwrite($fout, "/sbin/ifconfig pfsync0 syncif " . $carp_sync_int . "\n"); - fwrite($fout, "/sbin/ifconfig pfsync0 up\n"); - $pfsync_instances_counter++; - } + if($config['installedpackages']['carpsettings']['config'] != "") + foreach($config['installedpackages']['carpsettings']['config'] as $carp) + if($carp['pfsyncenabled'] != "") { + $pfsync = 1; + if($carp['premption'] != "") + $preempt = 1; + if($carp['balancing'] != "") + $using_arp_balance = 1; + $carp_sync_int = convert_friendly_interface_to_real_interface_name($carp['pfsyncinterface']); + $carp_sync_ip = $carp['pfsyncip']; + fwrite($fout, "/sbin/ifconfig pfsync0 create\n"); + fwrite($fout, "/sbin/ifconfig pfsync0 {$carp_sync_ip}/24\n"); + fwrite($fout, "/sbin/ifconfig pfsync0 syncif " . $carp_sync_int . "\n"); + fwrite($fout, "/sbin/ifconfig pfsync0 up\n"); + $pfsync_instances_counter++; + } fwrite($fout, "/etc/rc.filter_configure"); fclose($fout); mwexec("chmod a+x /usr/local/etc/rc.d/carp.sh"); |