#!/usr/local/bin/php "") { if($status == true) { $carp_counter=find_number_of_created_carp_interfaces(); mwexec("/sbin/sysctl net.inet.carp.allow=0"); for($x=0; $x<$carp_counter; $x++) { mwexec("/sbin/ifconfig carp{$x} down"); mwexec("/sbin/ifconfig carp{$x} destroy"); } $savemsg = "{$carp_counter} IPs have been disabled."; } else { $savemsg = "CARP has been enabled."; mwexec("/sbin/sysctl net.inet.carp.allow=1"); interfaces_carp_configure(); interfaces_carp_bringup(); } } $status = get_carp_status(); $pgtitle = "CARP: Status"; include("head.inc"); ?>

"; } else { $carp_enabled = true; echo ""; } if(is_array($config['virtualip']['vip'])) { foreach($config['virtualip']['vip'] as $carp) { if ($carp['mode'] == "carp") $carpcount++; } if ($carpcount == 0) { echo "

Could not locate any defined CARP interfaces."; echo "
"; include("fend.inc"); echo ""; exit; } } ?>

"; $align = "valign='middle'"; if($carp_enabled == false) { $icon = ""; $status = "DISABLED"; $carp_int = "carp" . $carpint; } else { if($status == "MASTER") { $icon = ""; } else if($status == "BACKUP") { $icon = ""; } else if($status == "INIT") { $icon = ""; } } echo ""; echo ""; echo ""; echo ""; $carpint++; } } ?>
Carp Interface
Virtual IP
Status
" . $carp_int . " 
" . $ipaddress . " 
{$icon}  " . $status . " 
pfSync nodes:
"; echo "
";
  system("/sbin/pfctl -vvss | /usr/bin/grep creator | /usr/bin/cut -d\" \" -f7 | /usr/bin/sort -u");
  echo "
"; ?>