config tool:Fix tap name filter error

when tap name is number, it will lead to failure of
adding tap dev, fix it.

Tracked-On: #7351

Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
This commit is contained in:
hangliu1 2022-04-24 05:18:15 -04:00 committed by acrnsi-robot
parent c962eaa3c9
commit e63a17a7c8
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ function unbind_device() {
function create_tap() { function create_tap() {
# create a unique tap device for each VM # create a unique tap device for each VM
tap=$1 tap=$1
tap_exist=$(ip a | grep "$tap" | awk '{print $1}') tap_exist=$(ip a | grep "$tap: " | awk '{print $1}')
if [ "$tap_exist"x != "x" ]; then if [ "$tap_exist"x != "x" ]; then
echo "$tap TAP device already available, reusing it." echo "$tap TAP device already available, reusing it."
else else