diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-05-05 18:49:14 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-05-05 18:49:14 +0000 |
commit | 759947c25265b977656a7f0f3e7e41c287a1090e (patch) | |
tree | dc679ac12268677aebe2995bbe716eb8db0278d3 /packages | |
parent | 57a0e25fce03fb7bb3dd33c70aa408418e6f1ddf (diff) | |
download | pfsense-packages-759947c25265b977656a7f0f3e7e41c287a1090e.tar.gz pfsense-packages-759947c25265b977656a7f0f3e7e41c287a1090e.tar.bz2 pfsense-packages-759947c25265b977656a7f0f3e7e41c287a1090e.zip |
Restore previous beahvior for carp.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/carp.xml | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/packages/carp.xml b/packages/carp.xml index 1b9682ed..6c562170 100644 --- a/packages/carp.xml +++ b/packages/carp.xml @@ -222,6 +222,22 @@ 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'] != "") + fwrite($fout, "/sbin/sysctl net.inet.carp.preempt=1\n"); + if($carp['balancing'] != "") + fwrite($fout, "/sbin/sysctl net.inet.arpbalance=1\n"); + $carp_sync_int = convert_friendly_interface_to_real_interface_name($carp['pfsyncinterface']); + fwrite($fout, "/sbin/ifconfig pfsync0 create\n"); + fwrite($fout, "/sbin/ifconfig pfsync0 syncdev " . $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) { /* @@ -240,22 +256,6 @@ $carp_instances_counter++; } } - if($config['installedpackages']['carpsettings']['config'] != "") { - foreach($config['installedpackages']['carpsettings']['config'] as $carp) - if($carp['pfsyncenabled'] != "") { - $pfsync = 1; - if($carp['premption'] != "") - fwrite($fout, "/sbin/sysctl net.inet.carp.preempt=1\n"); - if($carp['balancing'] != "") - fwrite($fout, "/sbin/sysctl net.inet.arpbalance=1\n"); - $carp_sync_int = convert_friendly_interface_to_real_interface_name($carp['pfsyncinterface']); - fwrite($fout, "/sbin/ifconfig pfsync0 create\n"); - fwrite($fout, "/sbin/ifconfig pfsync0 syncdev " . $carp_sync_int . "\n"); - fwrite($fout, "/sbin/ifconfig {$carp_sync_int} up\n"); - fwrite($fout, "/sbin/ifconfig pfsync0 up\n"); - $pfsync_instances_counter++; - } - } fclose($fout); chmod("/usr/local/pkg/pf/carp.sh", 0755); mwexec("/usr/local/pkg/pf/carp.sh"); |