summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
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