From f0767937867b1ec0dbacf7160c6e8737f7494524 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 19 Apr 2023 22:34:38 +0200 Subject: [PATCH] dhclient --- run/network.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/run/network.sh b/run/network.sh index 95a6a16..dd992b5 100644 --- a/run/network.sh +++ b/run/network.sh @@ -19,32 +19,32 @@ configureMacVlan () { VM_NET_TAP="_VmMacvtap" echo "Info: Retrieving IP via DHCP using MAC ${VM_NET_MAC}..." - + ip l add link eth0 name ${VM_NET_TAP} address ${VM_NET_MAC} type macvtap mode bridge || true ip l set ${VM_NET_TAP} up - + ip a flush eth0 ip a flush ${VM_NET_TAP} - udhcpc -v ${VM_NET_TAP} - _DhcpIP=$( udhcpc -v ${VM_NET_TAP} 2>&1 | grep ^bound | cut -d' ' -f3 ) + dhclient -v ${VM_NET_TAP} + _DhcpIP=$( dhclient -v ${VM_NET_TAP} 2>&1 | grep ^bound | cut -d' ' -f3 ) [[ "${_DhcpIP}" == [0-9.]* ]] \ && echo "Info: Retrieved IP: ${_DhcpIP} from DHCP with MAC: ${VM_NET_MAC}" \ || ( echo "ERROR: Cannot retrieve IP from DHCP with MAC: ${VM_NET_MAC}" && exit 16 ) ip a flush ${VM_NET_TAP} - + _tmpTapPath="/dev/tap$(