"") { interfaces_carp_set_maintenancemode(!isset($config["virtualip_carp_maintenancemode"])); } if($_POST['disablecarp'] <> "") { if($status > 0) { set_single_sysctl('net.inet.carp.allow', '0'); if(is_array($config['virtualip']['vip'])) { $viparr = &$config['virtualip']['vip']; foreach ($viparr as $vip) { switch ($vip['mode']) { case "carp": interface_vip_bring_down($vip); interface_ipalias_cleanup("{$vip['interface']}_vip{$vip['vhid']}"); sleep(1); break; } } } $savemsg = sprintf(gettext("%s IPs have been disabled. Please note that disabling does not survive a reboot."), $carp_counter); $status = 0; } else { $savemsg = gettext("CARP has been enabled."); if(is_array($config['virtualip']['vip'])) { $viparr = &$config['virtualip']['vip']; foreach ($viparr as $vip) { switch ($vip['mode']) { case "carp": interface_carp_configure($vip); sleep(1); break; case 'ipalias': if (strpos($vip['interface'], '_vip')) interface_ipalias_configure($vip); break; } } } interfaces_sync_setup(); set_single_sysctl('net.inet.carp.allow', '1'); $status = 1; } } $carp_detected_problems = ((get_single_sysctl("net.inet.carp.demotion")) > 0); $pgtitle = array(gettext("Status"),gettext("CARP")); $shortcut_section = "carp"; include("head.inc"); ?>