Unverified Commit fe6cccc7 authored by Shawn's avatar Shawn Committed by GitHub
Browse files

feat: Remove existing TAP interface (#643)

If the VM_NET_TAP is there from a prior container remove it so a new one may be built in its place. Its annoying when doing a docker-compose up and it fails because the old container leaves an interface and this prevents it from halting or looping for an error.
parent 74e9cad9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -388,6 +388,11 @@ if [[ "$DEBUG" == [Yy1]* ]]; then
  echo
fi

if [[ -d "/sys/class/net/$VM_NET_TAP" ]]; then                                               
    info "Lingering interface will be removed..."                        
    ip link delete "$VM_NET_TAP" || true
fi

if [[ "$DHCP" == [Yy1]* ]]; then

  checkOS