diff options
author | Ermal <eri@pfsense.org> | 2010-11-23 12:47:27 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-11-23 12:47:27 +0000 |
commit | 108cfddf3e133aecbe113fdf8eecfdc7fd2aab07 (patch) | |
tree | 09d2dc08769f03887502fc35534c8160b0e71cb3 /etc | |
parent | 83ae810386210eca593244035825296170281db4 (diff) | |
download | pfsense-108cfddf3e133aecbe113fdf8eecfdc7fd2aab07.zip pfsense-108cfddf3e133aecbe113fdf8eecfdc7fd2aab07.tar.gz |
Ticket #1023. Correct the widget code bringing it full speed with latest carp code.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 7ffbf24..a2cb02e 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -339,11 +339,8 @@ function convert_ip_to_network_format($ip, $subnet) { * get_carp_interface_status($carpinterface): returns the status of a carp ip */ function get_carp_interface_status($carpinterface) { - /* basically cache the contents of ifconfig statement - to speed up this routine */ - global $carp_query; - if($carp_query == "") - $carp_query = split("\n", `/sbin/ifconfig $carpinterface | grep carp`); + $carp_query = ""; + exec("/sbin/ifconfig $carpinterface | /usr/bin/grep -v grep | /usr/bin/grep carp:", $carp_query); foreach($carp_query as $int) { if(stristr($int, "MASTER")) return "MASTER"; |