From 51cbc17c4a9d113fa3d60edad30c2ed7b4413ad7 Mon Sep 17 00:00:00 2001 From: Chris Krelle Date: Tue, 20 Nov 2012 15:21:29 -0800 Subject: [PATCH] added br* filter for interfaces --- flavours/hwdiscovery/init | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flavours/hwdiscovery/init b/flavours/hwdiscovery/init index 987440f6..846a2851 100644 --- a/flavours/hwdiscovery/init +++ b/flavours/hwdiscovery/init @@ -6,8 +6,7 @@ CpuCount=`hwinfo --cpu|grep "Hardware Class: cpu"|wc -l` MemorySize=`hwinfo --memory|grep "Memory Size:"|awk -F':' {'print $2'}|tr -d ' '` DiskSize=`lshw -C disk|grep size|awk -F'(' {'print $2'}|tr -d ')'|tr -d ' '` NicInfo1=`hwinfo --network|grep -B2 "Link detected: yes"|grep -C1 "HW Address:"` - -NicInfo2=`echo "${NicInfo1}"|awk '/Device File: vlan*/{for(x=NR-2;x<=NR+2;x++)d[x];}{a[NR]=$0}END{for(i=1;i<=NR;i++)if(!(i in d))print a[i]}'` +NicInfo2=`echo "${NicInfo1}"|awk '/Device File: (vlan*|br*)/{for(x=NR-2;x<=NR+2;x++)d[x];}{a[NR]=$0}END{for(i=1;i<=NR;i++)if(!(i in d))print a[i]}'` NicDev=`echo "${NicInfo2}"|grep "Device File:"|awk -F':' {'print $2'}|tr -d ' '` NicMac=`echo "${NicInfo2}"|grep "HW Address:"|awk -F'ss:' {'print $2'}|tr -d ' '`