Skip to content

Commit 71a314c

Browse files
author
Deepinder Setia
committed
Handle error removing vrouter module
1 parent be8f0fe commit 71a314c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎unstack.sh‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ if [[ -n "$SCREEN" ]]; then
145145
fi
146146
cmd=$(lsmod | grep vrouter)
147147
if [ $? == 0 ]; then
148-
sudo rmmod vrouter
149-
source /etc/contrail/agent_param
150-
sudo rm -f /etc/sysconfig/network-scripts/ifcfg-$dev
151-
sudo rm -f /etc/sysconfig/network-scripts/ifcfg-vhost0
148+
cmd=$(sudo rmmod vrouter)
149+
if [ $? == 0 ]; then
150+
source /etc/contrail/agent_param
151+
sudo rm -f /etc/sysconfig/network-scripts/ifcfg-$dev
152+
sudo rm -f /etc/sysconfig/network-scripts/ifcfg-vhost0
153+
fi
152154
fi
153155

154156
cleanup_tmp

0 commit comments

Comments
 (0)