Guest User

QEMU ifdown

a guest
Feb 8th, 2016
381
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data