diff options
-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 7928c118..88c2e70e 100644 --- a/packages/carp.xml +++ b/packages/carp.xml @@ -221,6 +221,21 @@ global $config; $carp_instances_counter = 0; $pfsync_instances_counter = 0; + 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']); + fwrite($fout, "/sbin/ifconfig pfsync0 create\n"); + fwrite($fout, "/sbin/ifconfig pfsync0 syncif " . $carp_sync_int . "\n"); + fwrite($fout, "/sbin/ifconfig {$carp_sync_int} up\n"); + fwrite($fout, "/sbin/ifconfig pfsync0 up\n"); + $pfsync_instances_counter++; + } if($config['installedpackages']['carp']['config'] != "") { foreach($config['installedpackages']['carp']['config'] as $carp) { /* @@ -242,21 +257,7 @@ $carp_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']); - fwrite($fout, "/sbin/ifconfig pfsync0 create\n"); - fwrite($fout, "/sbin/ifconfig pfsync0 syncif " . $carp_sync_int . "\n"); - fwrite($fout, "/sbin/ifconfig {$carp_sync_int} up\n"); - fwrite($fout, "/sbin/ifconfig pfsync0 up\n"); - $pfsync_instances_counter++; - } + fwrite($fout, "/etc/rc.filter_configure"); fclose($fout); chmod("/usr/local/etc/rc.d/carp.sh", 0755); |