mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-09 18:07:50 +08:00
DHCP
This commit is contained in:
parent
0b6465e0c7
commit
73a1d82ded
@ -161,17 +161,21 @@ if [ "$DEBUG" = "Y" ]; then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$GATEWAY" == "172."* ]]; then
|
if [ "$DHCP" != "Y" ]; then
|
||||||
# Bridge network
|
|
||||||
configureNAT
|
|
||||||
else
|
|
||||||
if [ "$DHCP" = "Y" ]; then
|
|
||||||
# Configuration for DHCP IP
|
|
||||||
configureDHCP
|
|
||||||
else
|
|
||||||
# Configuration for static IP
|
# Configuration for static IP
|
||||||
configureNAT
|
configureNAT
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
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
|
fi
|
||||||
|
|
||||||
|
# Configuration for DHCP IP
|
||||||
|
configureDHCP
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
NET_OPTS="${NET_OPTS} -device virtio-net-pci,romfile=,netdev=hostnet0,mac=${VM_NET_MAC},id=net0"
|
NET_OPTS="${NET_OPTS} -device virtio-net-pci,romfile=,netdev=hostnet0,mac=${VM_NET_MAC},id=net0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user