Commit 39b373ea authored by Russ Fish's avatar Russ Fish
Browse files

The CygWin minires-devel package includes resolv.h, __res_init, and __res_state.

This is used to locate the Boss, assuming that it provides the DNS service.
Create an /etc/resolv.conf file at boot-up from the ipconfig DNS state.
parent 83bcb17b
...@@ -57,6 +57,7 @@ endif ...@@ -57,6 +57,7 @@ endif
ifeq ($(SYSTEM),CYGWIN_NT-5.1) ifeq ($(SYSTEM),CYGWIN_NT-5.1)
# Cygwin on Windows XP (a.k.a. NT 5.1) - resembles the Linux case. # Cygwin on Windows XP (a.k.a. NT 5.1) - resembles the Linux case.
MDSUBDIR = cygwinxp MDSUBDIR = cygwinxp
TMSLIBS += -lminires
endif endif
ifeq ($(EVENTSYS),1) ifeq ($(EVENTSYS),1)
...@@ -81,7 +82,7 @@ tmcc-shared: tmcc.c decls.h $(SSLOBJ) ...@@ -81,7 +82,7 @@ tmcc-shared: tmcc.c decls.h $(SSLOBJ)
$(LFLAGS) $(TMLIBS) $(LFLAGS) $(TMLIBS)
tmcc-nossl: tmcc.c decls.h tmcc-nossl: tmcc.c decls.h
$(CC) $(CFLAGS) -static -g -o tmcc-nossl $< $(LFLAGS) $(CC) $(CFLAGS) -static -g -o tmcc-nossl $< $(LFLAGS) $(TMSLIBS)
findif: findif.o findif: findif.o
$(CC) $(CFLAGS) -g -o findif findif.o $(LFLAGS) -static $(CC) $(CFLAGS) -g -o findif findif.o $(LFLAGS) -static
......
...@@ -57,3 +57,13 @@ else ...@@ -57,3 +57,13 @@ else
# Change hostname and computername, rename My Computer, reboot on success. # Change hostname and computername, rename My Computer, reboot on success.
/usr/local/etc/emulab/WSName /N:$nodeid /REBOOT /MCN /usr/local/etc/emulab/WSName /N:$nodeid /REBOOT /MCN
fi fi
# Sometimes the network stack gets out of sync: 'ipconfig /all' reports different
# status on the interfaces than 'netsh interface show interface'. This might help.
netsh interface reset all
# Windows DHCP doesn't make a /etc/resolv.h, which tmcc needs for bossinfo.
# Make one from nslookup output.
ipconfig /all | awk \
'/^ *Connection-specific DNS Suffix/{print "search", $NF} \
/^ *DNS Servers/{print "nameserver", $NF}' > /etc/resolv.conf
...@@ -49,7 +49,7 @@ typedef int socklen_t; ...@@ -49,7 +49,7 @@ typedef int socklen_t;
#endif #endif
#ifndef _WIN32 #ifndef _WIN32
# undef BOSSNODE # undef BOSSNODE
# if !defined(BOSSNODE) && !defined(__CYGWIN__) # if !defined(BOSSNODE)
# include <resolv.h> # include <resolv.h>
# endif # endif
#endif #endif
...@@ -417,7 +417,7 @@ getbossnode(char **bossnode, int *portp) ...@@ -417,7 +417,7 @@ getbossnode(char **bossnode, int *portp)
} }
} }
# if ! defined(_WIN32) && ! defined(__CYGWIN__) # if ! defined(_WIN32)
{ {
/* /*
* Nameserver goo * Nameserver goo
......
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