aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMartin André <m.andre@redhat.com>2016-03-16 08:58:34 +0900
committerMartin André <m.andre@redhat.com>2016-03-16 09:23:30 +0900
commit10b8cce26849d08a94f42ddc53b0ef7f3281982d (patch)
treeda86b8e4bc4a86f2f65d3d0af3172b85834f49f0 /tools
parentf4d6aaf0979754b6198f702e309e4a4688b4645b (diff)
downloadkolla-10b8cce26849d08a94f42ddc53b0ef7f3281982d.tar.gz
kolla-10b8cce26849d08a94f42ddc53b0ef7f3281982d.zip
Remove useless dependency on ifconfig
We can use the ip command to achieve the same thing. TrivialFix Change-Id: I903467c90495388cbc592b56d96bd3a4675df430
Diffstat (limited to 'tools')
-rwxr-xr-xtools/cleanup-host20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/cleanup-host b/tools/cleanup-host
index 18353c7b1..1fc0c7aed 100755
--- a/tools/cleanup-host
+++ b/tools/cleanup-host
@@ -5,24 +5,24 @@ REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
. tools/validate-docker-execute.sh
-# Spawning the neutron-agents container leaves artifacts on the host.
+# Spawning the neutron agents containers leaves artifacts on the host.
# This script removes these artifacts.
ip netns list | while read -r line ; do
echo "Removing network namespace $line on the host"
ip netns delete $line
done
-ifconfig | grep tap | awk '{print $1;}'| cut -f1 -d':' | while read -r line ; do
- echo "Removing tap interface $line on the host"
- ip link delete $line type veth
+ip -o link show | awk -F': ' '/tap/{print $2}' | while read -r ifname ; do
+ echo "Removing tap interface $ifname on the host"
+ ip link delete $ifname type veth
done
-ifconfig | grep brq | awk '{print $1;}'| cut -f1 -d':' | while read -r line ; do
- echo "Removing linux bridge $line on the host"
- ip link delete $line type bridge
+ip -o link show | awk -F': ' '/brq/{print $2}' | while read -r ifname ; do
+ echo "Removing linux bridge $ifname on the host"
+ ip link delete $ifname type bridge
done
-ifconfig | grep vxlan | awk '{print $1;}'| cut -f1 -d':' | while read -r line ; do
- echo "Removing vxlan interface $line on the host"
- ip link delete $line type vxlan
+ip -o link show | awk -F': ' '/vxlan/{print $2}' | while read -r ifname ; do
+ echo "Removing vxlan interface $ifname on the host"
+ ip link delete $ifname type vxlan
done