Guest User

QEMU ifdown

a guest
Feb 8th, 2016
808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. if [ -n "$(ip addr | grep vmtap0)" ];
  4. then
  5.     echo Downing vmtap0 link...
  6.  
  7.     # Down vmtap0
  8.     ip link set vmtap0 down
  9.     sleep 0.5s
  10.  
  11.     if [ -n "$(brctl show br0 | grep vmtap0)" ];
  12.     then
  13.         # Remove from br0
  14.         echo Removing vmtap0 from bridge...
  15.         brctl delif br0 vmtap0
  16.     fi
  17. fi
Add Comment
Please, Sign In to add comment