Advertisement
gheja

Untitled

Jun 20th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. iface="eth1x1"
  4. iface_new="eth1x2"
  5. iface_temp="eth1x9"
  6. bridge="br1"
  7.  
  8. brctl delif $bridge $iface
  9. sleep 2
  10.  
  11. ifconfig $iface 0.0.0.0 down
  12. ifconfig $iface_new 0.0.0.0 down
  13. sleep 2
  14.  
  15. ip link $iface set name $iface_temp
  16. sleep 2
  17.  
  18. ip link $iface_new set name $iface
  19. sleep 2
  20.  
  21. ifconfig $iface 0.0.0.0 up
  22. sleep 2
  23.  
  24. brctl addif $bridge $iface
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement