From e802e5196298a5c840bcbf54c3b38a290be923cb Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Wed, 22 Jun 2016 08:02:17 -0500 Subject: [PATCH] show disconnected ethX interfaces on the dashboard; also more explicit regex matching for loopback adaptor --- plugins/dynamix/include/DashUpdate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/dynamix/include/DashUpdate.php b/plugins/dynamix/include/DashUpdate.php index 62660c8f6..acd301c2c 100644 --- a/plugins/dynamix/include/DashUpdate.php +++ b/plugins/dynamix/include/DashUpdate.php @@ -185,8 +185,8 @@ case 'port': } } break; - case 'port': exec("ifconfig -s|awk '/^(bond|eth|lo)/{print $3\"#\"$7}'",$ports); break; - case 'link': exec("ifconfig -s|awk '/^(bond|eth|lo)/{print \"Errors: \"$4\"
Drops: \"$5\"
Overruns: \"$6\"#Errors: \"$8\"
Drops: \"$9\"
Overruns: \"$10}'",$ports); break; + case 'port': exec("ifconfig -a -s|awk '/^(bond|eth|lo\s)/{print $3\"#\"$7}'",$ports); break; + case 'link': exec("ifconfig -a -s|awk '/^(bond|eth|lo\s)/{print \"Errors: \"$4\"
Drops: \"$5\"
Overruns: \"$6\"#Errors: \"$8\"
Drops: \"$9\"
Overruns: \"$10}'",$ports); break; default: $ports = [];} echo implode('#',$ports); break;