solve interface name error when name length is 15

Change-Id: Iff7909e504e04600d880bc2c006c737f0d68d70f
Signed-off-by: Yao Lu <lu.yao135@zte.com.cn>
This commit is contained in:
Yao Lu 2017-01-12 19:52:56 +08:00
parent c148587836
commit f8f5ec6671
1 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ function get_net_info(){
fi
for nic in $physical_networks
do
vlan_nic=`cat /proc/net/vlan/config | grep $nic |awk -F ' ' {'print $1'}`
vlan_nic=`cat /proc/net/vlan/config | grep $nic |awk -F '|' {'print $1'}`
if [ ! -z "$vlan_nic" ];then
all_vlan_nic+=" $vlan_nic "
fi
@ -115,7 +115,7 @@ function get_net_info(){
STATE="down"
fi
if [ -z "$BOND" ]; then
vlan_nic=`cat /proc/net/vlan/config |awk -F ' ' {'print $1'} |grep -w "${iface}$"`
vlan_nic=`cat /proc/net/vlan/config |awk -F '|' {'print $1'} | sed s/[[:space:]]//g |grep -w "${iface}$"`
if [ -z "$vlan_nic" ];then
TYPE="ether"
else