Skip to content

Commit 334203a

Browse files
committed
update dhcp script
1 parent 228b17c commit 334203a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

qnx_qemu/configs/network_setup_dhcp.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,7 @@ MAX_RETRIES=10 # 10 retries * 3 seconds = 30 seconds tot
4141

4242
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
4343
# Get current IP address for vtnet0
44-
45-
# It can happen that dhcpcd at the beggining assigns an APIPA address (169.254.x.x)
46-
# Wait for the correct IP assignment
47-
IP_ADDR_TO_CHECK=$(ifconfig vtnet0 | grep 'inet ' | awk '{print $2}')
48-
if ! echo "$IP_ADDR_TO_CHECK" | grep -q "^169\.254"; then
49-
IP_ADDR=$IP_ADDR_TO_CHECK
50-
fi
44+
IP_ADDR=$(ifconfig vtnet0 | grep 'inet ' | awk '{print $2}')
5145

5246
if [ -n "$IP_ADDR" ] && [ "$IP_ADDR" != "0.0.0.0" ]; then
5347
echo "---> DHCP successful! Acquired IP"
@@ -95,4 +89,4 @@ fi
9589
# Configure system network settings
9690
sysctl -w net.inet.icmp.bmcastecho=1 > /dev/null # Enable ICMP broadcast echo (responds to broadcast pings)
9791

98-
echo "---> Network configuration completed"
92+
echo "---> Network configuration completed"

0 commit comments

Comments
 (0)