add get_carp_interface_status($carpinterface): returns the status of a carp ip

This commit is contained in:
Scott Ullrich 2005-02-18 23:46:27 +00:00
parent b04a6ca448
commit 591afdfd14

View File

@ -141,6 +141,14 @@ function find_ip_interface($ip) {
return false;
}
/*
* get_carp_interface_status($carpinterface): returns the status of a carp ip
*/
function get_carp_interface_status($carpinterface) {
$status = exec_command("/sbin/ifconfig {$carpinterface} | grep \"carp:\" | cut -d\" \" -f2");
return $status;
}
/*
* find_carp_interface($ip): return the carp interface where an ip is defined
*/