summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-09-18 19:36:46 +0000
committerColin Smith <colin@pfsense.org>2005-09-18 19:36:46 +0000
commit49149b86c3ba1becbf21fb307934c2e82ec89458 (patch)
tree647e79d669ec255b953d3b85414950f48e4e54f7 /etc
parent202036466e4ec06fea91b315c51370355243752b (diff)
downloadpfsense-49149b86c3ba1becbf21fb307934c2e82ec89458.zip
pfsense-49149b86c3ba1becbf21fb307934c2e82ec89458.tar.gz
Trim one preg_grep() call.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/util.inc9
1 files changed, 4 insertions, 5 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 3cd38c2..db3b4a4 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -249,12 +249,11 @@ function get_interface_list($mode = "active", $keyby = "physical") {
$intlist = explode(" ", trim(shell_exec("/sbin/ifconfig -l")));
exec("/sbin/ifconfig -a", $ifconfig);
$regexp = '/(' . implode('|', $intlist) . '):\s/';
- $ints = preg_grep($regexp, $ifconfig);
$ifstatus = preg_grep('/status:/', $ifconfig);
- foreach($ints as $value) {
- $status = trim(array_shift($ifstatus));
- if(stristr($status, "active")) $upints[] = array_shift($intlist);
- }
+ $i = 0;
+ foreach($ifstatus as $status) {
+ if(stristr($status, "active")) $upints[] = array_shift($intlist);
+ }
break;
}
/* build interface list with netstat */
OpenPOWER on IntegriCloud