From 591afdfd148acc9011d99d914c0fc53adab7240f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 18 Feb 2005 23:46:27 +0000 Subject: [PATCH] add get_carp_interface_status($carpinterface): returns the status of a carp ip --- etc/inc/pfsense-utils.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 900006668b..d11db25a89 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -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 */