"") { if($status == true) { $carp_ints = get_all_carp_interfaces(); mwexec("/sbin/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); sleep(1); break; case "carpdev-dhcp": interface_vip_bring_down($vip); sleep(1); break; } } } $savemsg = sprintf(gettext("%s IPs have been disabled."), $carp_counter); } else { $savemsg = gettext("CARP has been enabled."); mwexec("/sbin/sysctl net.inet.carp.allow=1"); interfaces_carp_setup(); 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 "carpdev-dhcp": interface_carpdev_configure($vip); sleep(1); break; } } } } } $status = get_carp_status(); $pgtitle = array(gettext("Status"),gettext("CARP")); include("head.inc"); ?>