Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

QEMU ifup

a guest Feb 8th, 2016 345 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #!/bin/sh
  2.  
  3. if [ -z "$(ip addr | grep vmtap0)" ];
  4. then
  5.     echo No vmtap0 interface, creating...
  6.  
  7.     # No vmtap0 yet.
  8.     ip tuntap add mode tap vmtap0
  9.     sleep 0.5s
  10. else
  11.     echo Using existing vmtap0 interface...
  12. fi
  13.  
  14. # Add to br0
  15. if [ -z "$(brctl show br0 | grep vmtap0)" ];
  16. then
  17.     echo Adding vmtap0 to bridge...
  18.     brctl addif br0 vmtap0
  19.     sleep 0.5s
  20. fi
  21.  
  22. # Up vmtap0
  23. echo Upping vmtap0 link...
  24. ip link set vmtap0 up
  25. sleep 0.5s
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top