Revision 79d28f42
Added by Scott Ullrich almost 17 years ago
etc/inc/interfaces.inc | ||
---|---|---|
636 | 636 |
unset($balanacing); |
637 | 637 |
unset($pfsyncenabled); |
638 | 638 |
} |
639 |
$cmdchain->add("Allow CARP", "/sbin/sysctl net.inet.carp.allow=1", false);
|
|
639 |
$cmdchain->add("Allow CARP", "/sbin/sysctl net.inet.carp.allow=1", true);
|
|
640 | 640 |
if($balanacing) { |
641 |
$cmdchain->add("Enable CARP ARP-balancing", "/sbin/sysctl net.inet.carp.arpbalance=1", false);
|
|
642 |
$cmdchain->add("Disallow CARP preemption", "/sbin/sysctl net.inet.carp.preempt=0", false);
|
|
641 |
$cmdchain->add("Enable CARP ARP-balancing", "/sbin/sysctl net.inet.carp.arpbalance=1", true);
|
|
642 |
$cmdchain->add("Disallow CARP preemption", "/sbin/sysctl net.inet.carp.preempt=0", true);
|
|
643 | 643 |
} else { |
644 |
$cmdchain->add("Enable CARP preemption", "/sbin/sysctl net.inet.carp.preempt=1", false);
|
|
644 |
$cmdchain->add("Enable CARP preemption", "/sbin/sysctl net.inet.carp.preempt=1", true);
|
|
645 | 645 |
} |
646 |
$cmdchain->add("Enable CARP logging", "/sbin/sysctl net.inet.carp.log=2", false);
|
|
646 |
$cmdchain->add("Enable CARP logging", "/sbin/sysctl net.inet.carp.log=2", true);
|
|
647 | 647 |
$carp_sync_int = convert_friendly_interface_to_real_interface_name($pfsyncinterface); |
648 | 648 |
if($g['booting']) { |
649 | 649 |
/* install rules to alllow pfsync to sync up during boot |
... | ... | |
667 | 667 |
//$fd = fopen("/tmp/carp.sh", "w"); |
668 | 668 |
$viparr = &$config['virtualip']['vip']; |
669 | 669 |
if($config['virtualip']['vip']) { |
670 |
$cmdchain->add("Allow CARP.", "/sbin/sysctl net.inet.carp.allow=1", false);
|
|
670 |
$cmdchain->add("Allow CARP.", "/sbin/sysctl net.inet.carp.allow=1", true);
|
|
671 | 671 |
} else { |
672 | 672 |
$viparr = array(); |
673 |
$cmdchain->add("Disallow CARP.", "/sbin/sysctl net.inet.carp.allow=0", false);
|
|
673 |
$cmdchain->add("Disallow CARP.", "/sbin/sysctl net.inet.carp.allow=0", true);
|
|
674 | 674 |
} |
675 | 675 |
if(!$viparr and $config['interfaces']['wan']['ipaddr'] == "carpdev-dhcp") { |
676 | 676 |
/* no vips exist but we need to bring up carpdev... */ |
Also available in: Unified diff
Ignore return text on sysctl commands