Commit 112d4c23 authored by Russ Fish's avatar Russ Fish
Browse files

Bugfix in the code which enables DHCP on all interfaces at first on Windows.

parent 8eda62e4
......@@ -104,11 +104,13 @@ else
# Unused interfaces will be disabled below. DHCP will be disabled on the
# experimental net interfaces by "netsh interface ip set address
# ... source=static ..." in BOOTDIR/rc.ifc, which is generated by logic
# ... source=static ..." in BOOTDIR/rc.ifc, which is generated in
# os_ifconfig_line() $IFCONFIG, invoked by rc.ifconfig .
ipconfig /all | tr -d '\r' | awk \
'/^Ethernet adapter/{ ifc = gensub("Ethernet adapter (.*):", "\\1", 1); next }\
/Dhcp Enabled.*No/{ stat = system("netsh interface ip set address \"$ifc\" dhcp");\
/Dhcp Enabled.*No/{ \
cmd = sprintf("netsh interface ip set address \"%s\" dhcp", ifc);\
print cmd; stat = system(cmd);\
printf("Enabled DHCP on %s, status %d.\n", ifc, stat) }'
# Get the desired node name from tmcc, and make sure we have a connection.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment