bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

Blame tests/p_bridge-utils/10-delete_bridge.sh

root 06ef83
#!/bin/bash
root 06ef83
# Author : Madhurranjan Mohaan <madhurranjan.mohaan@gmail.com>
root 06ef83
#add bridge
root 06ef83
bridge=testbridge2
Athmane Madjoudj 9e64cf
./tests/p_bridge-utils/05-add_bridge.sh $bridge
root 06ef83
#delete the bridge created
root 06ef83
bridge_present=`brctl show | grep $bridge`
root 06ef83
t_Log "Running $0 - Deleting the dummy bridge: $bridge"
root 06ef83
root 06ef83
if ! [ "$bridge_present" ]
root 06ef83
  then
root 06ef83
    ret_val=1
root 06ef83
else
root 06ef83
    t_Log "Deleting bridge $bridge"
root 06ef83
    brctl delbr $bridge
root 06ef83
    bridge_present=`brctl show | grep $bridge`
root 06ef83
  if [ $bridge_present ]
root 06ef83
  then
root 06ef83
    ret_val=1
root 06ef83
  else
root 06ef83
    ret_val=0  
root 06ef83
  fi
root 06ef83
fi
root 06ef83
t_CheckExitStatus $ret_val