Commit a79750de authored by Kirk Webb's avatar Kirk Webb

Fixes for Win7: route setup, os-specific rc

Rework the OS specific rc script a bit - still awful to behold, but a bit
better.  Add a new bit of magic to capture the mapping from mac address
to internal windows interface index.  May use this later for pinning an
route to the correct interface in rc.ifc.

Create a couple of symlinks for to getmac and devcon utilities from
the Makefile.

Add a delay after configuring the IP on an interface (before adding routes).
Windows can apparently return from the netsh configuration command before
everything is done.
parent 9e73c1eb
......@@ -84,6 +84,8 @@ sysetc-install: dir-install ###ifcfgs
# Boot log files have to be writable by root under rc.cygwin .
$(INSTALL) -c -m 775 -o root -d /var/log
$(INSTALL) -c -m 775 -o root -d /var/db
ln -f -s $(SYSTEM32)/getmac.exe /bin/getmac.exe
ln -f -s $(SYSTEM32)/devcon.exe /bin/devcon.exe
script-install: dir-install $(SCRIPTS)
$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm
......
......@@ -331,6 +331,7 @@ sub os_ifconfig_line($$$$$$$;$$%)
#
# Configure.
$uplines .= sprintf($IFCONFIG, $iface, $inet, $mask) . qq{\n };
$uplines .= qq{sleep 5\n }
# XXX: Going to assume for now that jumping through these hoops isn't necessary
# under Win7.
......@@ -702,12 +703,13 @@ sub os_routing_add_manual($$$$$;$)
# Re-doing the command later succeeds.
# Wrap the route command in a loop to make sure it gets done.
# Don't loop forever.
$cmd = "n=1; while ! ( $ROUTE print | grep -Fq $destip ); do \n
echo $cmd;\n
$cmd\n
let n++; if [[ \$n > 5 ]]; then break; fi
sleep 5\n
done";
#$cmd = "n=1; while ! ( $ROUTE print | grep -Fq $destip ); do \n
# echo $cmd;\n
# $cmd\n
# let n++; if [[ \$n > 5 ]]; then break; fi
# sleep 5\n
# done";
$cmd = "echo $cmd; $cmd";
return $cmd;
}
......
This diff is collapsed.
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