Commit 0d8e02ff authored by Jondy Zhao's avatar Jondy Zhao

Fix removed interface still seen by netsh interface show interface

parent 5be3ada3
...@@ -335,7 +335,7 @@ function install_tap_driver() ...@@ -335,7 +335,7 @@ function install_tap_driver()
# check if ifname has been installed # check if ifname has been installed
if [[ ! "$1" == "" ]] ; then if [[ ! "$1" == "" ]] ; then
netsh interface show interface | grep -q "\\b$1\\b" netsh interface ipv6 show interface | grep -q "\\b$1\\b"
if (( $? == 0 )) ; then if (( $? == 0 )) ; then
echo "Nothing need to do, \"$1\" has been installed." echo "Nothing need to do, \"$1\" has been installed."
return 0 return 0
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# #
# Remove virtual netcard installed by re6stnet # Remove virtual netcard installed by re6stnet
# #
for ifname in $(netsh interface show interface | gawk '{ print $3 }') ; do for ifname in $(netsh interface ipv6 show interface | gawk '{ print $5 }') ; do
if [[ ("$ifname" == re6stnet*) && ("$ifname" != "re6stnet-lo") ]] ; then if [[ ("$ifname" == re6stnet*) && ("$ifname" != "re6stnet-lo") ]] ; then
echo Removing network connection: $ifname echo Removing network connection: $ifname
ip vpntap del dev $ifname mode true ip vpntap del dev $ifname mode true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment