Unverified Commit 2f4e971b authored by Kroese's avatar Kroese Committed by GitHub
Browse files

DHCP

parent 17aa7986
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -161,17 +161,21 @@ if [ "$DEBUG" = "Y" ]; then

fi

if [[ "$GATEWAY" == "172."* ]]; then
  # Bridge network
if [ "$DHCP" != "Y" ]; then

 # Configuration for static IP
 configureNAT

else
  if [ "$DHCP" = "Y" ]; then

  if [[ "$GATEWAY" == "172."* ]]; then
    echo -n "ERROR: You cannot enable DHCP while the container is "
    echo "in a bridge network, only on a macvlan network!" && exit 86
  fi

  # Configuration for DHCP IP
  configureDHCP
  else
    # Configuration for static IP
    configureNAT
  fi

fi

NET_OPTS="${NET_OPTS} -device virtio-net-pci,romfile=,netdev=hostnet0,mac=${VM_NET_MAC},id=net0"