mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-12-14 06:10:32 +08:00
GUEST_MAC
This commit is contained in:
@@ -3,10 +3,12 @@ set -Eeuo pipefail
|
|||||||
|
|
||||||
# Docker environment variables
|
# Docker environment variables
|
||||||
|
|
||||||
|
: ${GUEST_MAC:='02:11:32:AA:BB:CC'}
|
||||||
|
|
||||||
: ${VM_NET_TAP:='dsm'}
|
: ${VM_NET_TAP:='dsm'}
|
||||||
: ${VM_NET_DEV:='eth0'}
|
: ${VM_NET_DEV:='eth0'}
|
||||||
: ${VM_NET_HOST:='VirtualDSM'}
|
: ${VM_NET_HOST:='VirtualDSM'}
|
||||||
: ${VM_NET_MAC:='02:11:32:AA:BB:CC'}
|
: ${VM_NET_MAC:='$GUEST_MAC'}
|
||||||
|
|
||||||
: ${DHCP:='N'}
|
: ${DHCP:='N'}
|
||||||
: ${DNS_SERVERS:=''}
|
: ${DNS_SERVERS:=''}
|
||||||
@@ -208,6 +210,7 @@ update-alternatives --set iptables /usr/sbin/iptables-legacy > /dev/null
|
|||||||
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy > /dev/null
|
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy > /dev/null
|
||||||
|
|
||||||
VM_NET_MAC="${VM_NET_MAC//-/:}"
|
VM_NET_MAC="${VM_NET_MAC//-/:}"
|
||||||
|
|
||||||
GATEWAY=$(ip r | grep default | awk '{print $3}')
|
GATEWAY=$(ip r | grep default | awk '{print $3}')
|
||||||
|
|
||||||
if [[ "${DEBUG}" == [Yy1]* ]]; then
|
if [[ "${DEBUG}" == [Yy1]* ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user