Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
5a3e106a
Commit
5a3e106a
authored
Aug 20, 2012
by
Kirk Webb
Browse files
Merge branch 'win7devel'
parents
02283879
92ee859b
Changes
31
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitattributes
View file @
5a3e106a
VERSION export-subst
# Files that already had DOS-style line endings and those
# that require them should be added to the list below.
clientside/sensors/slothd/idlemon.vbs -crlf
clientside/tmcc/cygwinseven/SetupComplete.cmd -crlf
clientside/tmcc/cygwinseven/unattend-x86.xml -crlf
clientside/tmcc/cygwinxp/cygwin-tcsh.bat -crlf
clientside/tmcc/cygwinxp/resolv.conf -crlf
clientside/tmcc/cygwinxp/site-lisp/cygwin-mount.el -crlf
clientside/tmcc/cygwinxp/site-lisp/site-start.el -crlf
clientside/tmcc/cygwinxp/sysprep.inf -crlf
delay/linux/iptables_mods/iptables-1.3.6-imq.diff -crlf
hyperviewer/hv.dsp -crlf
hyperviewer/hv.dsw -crlf
...
...
@@ -64,16 +72,10 @@ protogeni/demo/src/RequestSliverStart.as -crlf
protogeni/demo/src/RequestSliverUpdate.as -crlf
protogeni/demo/src/SimpleNodeClip.as -crlf
protogeni/demo/src/SliceWait.as -crlf
sensors/slothd/idlemon.vbs -crlf
tbsetup/ipassign/dre/prepass/pistream.h -crlf
tbsetup/ipassign/dre/prepass/postream.h -crlf
tbsetup/ipassign/etc/autocheck.conf -crlf
tbsetup/plab/libdslice/xmlrpcserver.py -crlf
tmcd/cygwinxp/cygwin-tcsh.bat -crlf
tmcd/cygwinxp/resolv.conf -crlf
tmcd/cygwinxp/site-lisp/cygwin-mount.el -crlf
tmcd/cygwinxp/site-lisp/site-start.el -crlf
tmcd/cygwinxp/sysprep.inf -crlf
www/csshover.htc -crlf
www/cssmenu.css -crlf
www/cssmenu-new.css -crlf
...
...
clientside/configure.in
View file @
5a3e106a
...
...
@@ -242,7 +242,7 @@ outfiles="Makeconf GNUmakefile \
tmcc/freebsd10/GNUmakefile tmcc/freebsd10/netif-emulab \
tmcc/cygwinxp/GNUmakefile tmcc/dp/GNUmakefile \
tmcc/openbsd/GNUmakefile tmcc/ron/GNUmakefile \
tmcc/plab/GNUmakefile \
tmcc/plab/GNUmakefile
tmcc/cygwinseven/GNUmakefile
\
os/GNUmakefile os/syncd/GNUmakefile \
os/dijkstra/GNUmakefile os/genhostsfile/GNUmakefile \
os/frisbee.redux/GNUmakefile \
...
...
clientside/event/linktest/linktest.pl
View file @
5a3e106a
...
...
@@ -77,6 +77,7 @@ use constant LIMIT_BW_MED => 10000000;
use
constant
LIMIT_BW_LO
=>
1000000
;
use
constant
LIMIT_BW_MIN
=>
64000
;
use
constant
LIMIT_BW_LOSS
=>
0.20
;
use
constant
LIMIT_BW_HI_Windows
=>
40000000
;
# Make sure that we dont get bogged down in being too accurate!
# Make sure the error is a certain significance before we start reporting it.
...
...
@@ -335,6 +336,7 @@ my $PATH_SCHEDFILE = "$VARDIR/logs/linktest.sched";
my
$PATH_SYNCSERVER
=
"
$VARDIR
/boot/syncserver
";
my
$PATH_TOPOFILE
=
"
$VARDIR
/boot/ltmap
";
my
$PATH_PTOPOFILE
=
"
$VARDIR
/boot/ltpmap
";
my
$PATH_WINPING
=
"
/cygdrive/c/windows/system32/ping.exe
";
my
$schedfile
=
$PATH_SCHEDFILE
;
if
(
$printsched
)
{
...
...
@@ -491,8 +493,9 @@ if (!exists($hostmap{$hostname})) {
# Determine if we can run at high priority.
#
my
$high_priority
=
1
;
if
(
$platform
eq
LINUX
&&
$hostmap
{
$hostname
}
->
isvnode
)
{
if
(
(
$platform
eq
LINUX
&&
$hostmap
{
$hostname
}
->
isvnode
)
||
$platform
=~
/CYGWIN/
)
{
# XXX Linux vnodes (openvz) cannot change their priority
# ... Windows can't either...
$high_priority
=
0
;
}
...
...
@@ -1185,6 +1188,28 @@ sub loss_test {
# Latency Test Functions
##############################################################################
# Explicit calculation of ping statistics (average and stddev)
# @param[0] := reference to array of samples.
# @return := (average, stddev)
sub
ping_stats
{
my
$measurements
=
shift
;
my
@rv
=
undef
;
if
(
defined
(
$measurements
)
and
@$measurements
)
{
my
$avg
=
0
;
map
{
$avg
+=
$_
}
@$measurements
;
$avg
/=
scalar
(
@$measurements
);
my
$std
=
0
;
map
{
$std
+=
(
$avg
-
$_
)
**
2
}
@$measurements
;
$std
=
(
$std
/
scalar
(
@$measurements
))
**
0.5
;
@rv
=
(
$avg
,
$std
);
}
return
@rv
;
}
# returns whether the link latency is in a valid test range.
sub
valid_latency
{
return
TRUE
;
...
...
@@ -1231,31 +1256,50 @@ sub ping_node {
}
elsif
(
$platform
=~
/CYGWIN/
)
{
# Neither Windows nor Cygwin ping has either send rate or timeout.
# Windows ping doesn't have -q, but it does have TTL, so use it.
$cmd
=
"
/cygdrive/c/WINDOWS/system32/ping.exe -n
$send_count
$ttlarg
$host
";
# The first ping is always wildly off under Windows due to arp
# and possibly other startup costs, so we grab an
# additional sample in anticipation of throwing out the first.
$send_count
++
;
$cmd
=
"
$PATH_WINPING
-n
$send_count
$ttlarg
$host
";
}
# note backticks passes SIGINT to child procs
my
@args
=
split
(
/\s+/
,
$cmd
);
my
@results
=
&my_tick
(
@args
);
my
@wintimes
=
();
# For Windows.
my
$reslt_cnt
=
@results
;
my
$result
=
$results
[
$reslt_cnt
-
2
];
if
(
$platform
eq
BSD
&&
$result
=~
/(\d+) packets received/
)
{
$count
=
$
1
;
}
elsif
(
$platform
eq
LINUX
&&
$result
=~
/(\d+) received/
)
{
$count
=
$
1
;
}
elsif
(
$platform
=~
/CYGWIN/
&&
$results
[
$reslt_cnt
-
3
]
=~
/Received = (\d+)/
)
{
$count
=
$
1
;
}
elsif
(
$platform
=~
/CYGWIN/
)
{
# The first ping under windows is often way off so we gather up
# the time measurements ourseleves and throw out the first sample.
# These measurements will be used below to calculate the mean
# and stddev of the latency.
foreach
my
$rline
(
@results
)
{
if
(
$rline
=~
/Reply from (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}): bytes=(\d+) time(=|<)(\d+)ms TTL=(\d+)/
)
{
my
$op
=
$
3
;
# Windows ping doesn't measure below 1 ms.
my
$time
=
$op
eq
"
<
"
?
0
:
$
4
;
push
@wintimes
,
$time
;
}
}
# throw out the first sample.
shift
@wintimes
;
$count
=
scalar
(
@wintimes
);
}
if
(
$count
)
{
$result
=
$results
[
$reslt_cnt
-
1
];
if
(
$result
=~
/\d+\.\d+\/(\d+\.\d+)\/\d+\.\d+\/(\d+\.\d+)/
)
{
$avg_latency
=
$
1
;
$stddev
=
$
2
;
}
elsif
(
$result
=~
/Average = (\d+)ms/
)
{
$avg_latency
=
$
1
;
$stddev
=
0.03
;
# Stddev is not reported on Windows.
if
(
$platform
=~
/CYGWIN/
)
{
(
$avg_latency
,
$stddev
)
=
&ping_stats
(
\
@wintimes
);
}
else
{
$result
=
$results
[
$reslt_cnt
-
1
];
if
(
$result
=~
/\d+\.\d+\/(\d+\.\d+)\/\d+\.\d+\/(\d+\.\d+)/
)
{
$avg_latency
=
$
1
;
$stddev
=
$
2
;
}
}
}
return
(
$count
,
$avg_latency
,
$stddev
);
...
...
@@ -1618,6 +1662,8 @@ sub bw_test {
my
$bw_error_low
=
((
$platform
=~
/CYGWIN/
)
?
INSIGNIFICANT_BW_ERROR_LO_Windows
:
INSIGNIFICANT_BW_ERROR_LO
);
my
$bw_limit_hi
=
LIMIT_BW_HI
;
#
# all nodes will execute the same reductions on the edge list
...
...
@@ -1659,7 +1705,7 @@ sub bw_test {
&print_link
(
$edge
)
.
"
\n
");
&info
("
*** Bandwidth is out of range
"
.
"
(
"
.
LIMIT_BW_LO
.
"
<= BW <=
"
.
LIMIT_BW_HI
.
"
)
"
.
"
or loss is too high (>
"
.
$bw_limit_hi
.
"
)
"
.
"
or loss is too high (>
"
.
LIMIT_BW_LOSS
.
"
).
\n
");
}
}
...
...
@@ -1686,7 +1732,7 @@ sub bw_test {
&print_link
(
$redge
)
.
"
\n
");
&info
("
*** Bandwidth is out of range
"
.
"
(
"
.
LIMIT_BW_LO
.
"
<= BW <=
"
.
LIMIT_BW_HI
.
"
)
"
.
"
or loss is too high (>
"
.
$bw_limit_hi
.
"
)
"
.
"
or loss is too high (>
"
.
LIMIT_BW_LOSS
.
"
).
\n
");
}
}
...
...
clientside/event/trafgen/GNUmakefile.in
View file @
5a3e106a
...
...
@@ -62,8 +62,8 @@ YCFLAGS += -I. -I$(TGSRCDIR) -DUSEEVENTS -DFREEBSD
LIBS += -ll -lcompat
endif
ifeq ($(SYSTEM),CYGWIN_NT
-5.1
)
# Cygwin on Windows XP
(a.k.a. NT 5.1)
- resembles the Linux case.
ifeq ($(
findstring CYGWIN_NT,$(
SYSTEM)
)
,CYGWIN_NT)
# Cygwin on Windows XP
/7
- resembles the Linux case.
CFLAGS += -DCYGWIN -DLINUX
YCFLAGS += -I. -I$(TGSRCDIR) -DUSEEVENTS -DCYGWIN -DLINUX
...
...
clientside/lib/tmcd/ssl.c
View file @
5a3e106a
...
...
@@ -52,7 +52,7 @@
#define TPM_CERTFILE "tpm.cert"
#define TPM_KEYFILE "tpm.key"
#ifdef
linux
#if
def
ined(linux) || defined(__CYGWIN__)
#define EAUTH EPERM
#endif
...
...
clientside/lib/tmcd/ssl.h
View file @
5a3e106a
...
...
@@ -42,25 +42,9 @@ int usetpm;
#define READ tmcd_sslread
#define CLOSE tmcd_sslclose
#else
#ifdef _WIN32
inline
int
win_send
(
SOCKET
s
,
const
char
FAR
*
buf
,
int
len
)
{
return
send
(
s
,
buf
,
len
,
0
);
}
inline
int
win_recv
(
SOCKET
s
,
char
FAR
*
buf
,
int
len
)
{
return
recv
(
s
,
buf
,
len
,
0
);
}
#define ACCEPT tmcd_accept
#define CONNECT connect
#define WRITE win_send
#define READ win_recv
#define CLOSE close
#else
#define ACCEPT tmcd_accept
#define CONNECT connect
#define WRITE write
#define READ read
#define CLOSE close
#endif
/*_WIN32*/
#endif
/*WITHSSL*/
clientside/os/GNUmakefile.in
View file @
5a3e106a
...
...
@@ -17,6 +17,12 @@ SUBDIRS = syncd dijkstra genhostsfile imagezip frisbee.redux
ifeq ($(SYSTEM),FreeBSD)
SUBDIRS += growdisk
endif
# XXX: Remove imagezip and frisbee from Cygwin builds - not working.
ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT)
SUBDIRS := $(filter-out imagezip frisbee.redux,$(SUBDIRS))
endif
all: all-subdirs
include $(TESTBED_SRCDIR)/GNUmakerules
...
...
@@ -42,13 +48,16 @@ client-install: client
$(INSTALL) -m 644 $(SRCDIR)/install-tarfile.1 $(DESTDIR)$(CLIENT_MANDIR)/man1/install-tarfile.1
$(INSTALL_PROGRAM) $(SRCDIR)/install-rpm $(LBINDIR)/install-rpm
$(MAKE) -C syncd client-install
ifneq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT) # Filter out again...
$(MAKE) -C dijkstra client-install
$(MAKE) -C genhostsfile client-install
$(MAKE) -C imagezip client-install
$(MAKE) -C frisbee.redux client-install
endif
$(MAKE) -C genhostsfile client-install
ifeq ($(SYSTEM),FreeBSD)
$(MAKE) -C growdisk client-install
endif
$(MAKE) -C frisbee.redux client-install
subboss: client
...
...
clientside/sensors/slothd/GNUmakefile.in
View file @
5a3e106a
...
...
@@ -27,8 +27,8 @@ SDLIBS+= -ltb -lmysqlclient
LIBS= $(MLIBS)
CP= cp -pf
ifeq ($(SYSTEM),CYGWIN_NT
-5.1
)
# Cygwin on Windows XP
(a.k.a. NT 5.1).
ifeq ($(
findstring CYGWIN_NT,$(
SYSTEM)
)
,CYGWIN_NT)
# Cygwin on Windows XP
/7
MLIBS += -liphlpapi
WINCLIENT = idlemon
...
...
@@ -70,7 +70,7 @@ boss-install: $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS) sdcollectd) webfe
client-install: client
$(INSTALL_PROGRAM) slothd$(EXE) $(DESTDIR)$(CLIENT_BINDIR)/slothd$(EXE)
ifeq ($(SYSTEM),CYGWIN_NT
-5.1
)
ifeq ($(
findstring CYGWIN_NT,$(
SYSTEM)
)
,CYGWIN_NT)
# If there are any RDP logins active, idlemon will be busy. Try moving it.
-mv $(IDLEMONEXE) $(IDLEMONEXE).prev
$(INSTALL_PROGRAM) idlemon$(EXE) $(IDLEMONEXE)
...
...
clientside/sensors/slothd/slothd.c
View file @
5a3e106a
...
...
@@ -152,6 +152,7 @@ int main(int argc, char **argv) {
tmppkt
=
pkt
;
pkt
=
opkt
;
opkt
=
tmppkt
;
bzero
(
pkt
,
sizeof
(
*
pkt
));
}
if
(
mopts
.
once
)
{
...
...
@@ -322,6 +323,21 @@ int init_slothd(void) {
parms
->
ifd
=
socket
(
PF_INET
,
SOCK_DGRAM
,
0
);
#endif
#ifdef __CYGWIN__
{
/*
* Grab number of cpu cores.
*/
SYSTEM_INFO
sysinfo
;
GetSystemInfo
(
&
sysinfo
);
parms
->
numcpu
=
sysinfo
.
dwNumberOfProcessors
;
if
(
parms
->
numcpu
<
1
)
/* Catch a bogus answer. */
parms
->
numcpu
=
1
;
}
#endif
/* prepare UDP connection to server */
if
((
parms
->
sd
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
))
<
0
)
{
lerror
(
"Could not alloc socket"
);
...
...
@@ -598,29 +614,10 @@ void get_load(SLOTHD_PACKET *pkt) {
* averaged by system logging so it's no good for us. As long as we set our
* threshold of CPU busyness below 1.0, this will work fine.
*/
char
*
ldavg_prog
[]
=
{
"tail"
,
"-1"
,
"/var/run/ldavg.csv"
,
NULL
};
int
get_ldavg
(
char
*
,
void
*
);
int
ncpu
=
-
1
;
void
get_load
(
SLOTHD_PACKET
*
pkt
)
{
pkt
->
loadavg
[
0
]
=
pkt
->
loadavg
[
1
]
=
pkt
->
loadavg
[
2
]
=
-
1
.
0
;
if
(
ncpu
<
0
)
{
/* Hyper-threading on the pc3000's convinces NT that it has 2 processors,
* so it considers a busy process to be 50% utilization. One busy process
* should be 100% load average for us. Use "cpu count" in /proc/cpuinfo
* to get a multiplier.
*/
FILE
*
cpuinfo
=
fopen
(
"/proc/cpuinfo"
,
"r"
);
char
line
[
80
];
while
(
ncpu
<
0
&&
fgets
(
line
,
80
,
cpuinfo
)
&&
!
feof
(
cpuinfo
)
&&
!
ferror
(
cpuinfo
))
sscanf
(
line
,
"cpu count : %d"
,
&
ncpu
);
static
char
*
ldavg_prog
[]
=
{
"tail"
,
"-1"
,
"/var/run/ldavg.csv"
,
NULL
};
if
(
ncpu
<
1
)
/* One-cpu machines have a cpu count of zero. */
ncpu
=
1
;
}
pkt
->
loadavg
[
0
]
=
pkt
->
loadavg
[
1
]
=
pkt
->
loadavg
[
2
]
=
-
1
.
0
;
if
(
procpipe
(
ldavg_prog
,
&
get_ldavg
,
(
void
*
)
pkt
))
lwarn
(
"get_ldavg exec failed."
);
...
...
@@ -637,7 +634,8 @@ int get_ldavg(char *buf, void *data) {
}
/* NT reports load as a percent, e.g. 44.5; we want a fraction, e.g. 0.445 */
pkt
->
loadavg
[
0
]
=
pkt
->
loadavg
[
1
]
=
pkt
->
loadavg
[
2
]
=
load
*
ncpu
/
100
.
0
;
pkt
->
loadavg
[
0
]
=
pkt
->
loadavg
[
1
]
=
pkt
->
loadavg
[
2
]
=
load
*
parms
->
numcpu
/
100
.
0
;
if
(
opts
->
debug
)
printf
(
"load averages: %f, %f, %f
\n
"
,
pkt
->
loadavg
[
0
],
pkt
->
loadavg
[
1
],
pkt
->
loadavg
[
2
]);
...
...
@@ -798,9 +796,15 @@ int get_counters(char *buf, void *data) {
#else
/* __CYGWIN__ */
void
get_packet_counts
(
SLOTHD_PACKET
*
pkt
)
{
static
char
*
filters
[]
=
{
"WAN Miniport"
,
"WFP LightWeight Filter"
,
"QoS Packet Scheduler"
,
NULL
};
static
DWORD
dwSize
;
DWORD
ret
;
int
i
;
char
curaddr
[
MACADDRLEN
];
char
*
descr
;
int
i
,
j
;
/* Call GetIfTable(), an MS IP Helper Function, to get packet counters. */
PMIB_IFTABLE
iftable
;
...
...
@@ -818,30 +822,56 @@ void get_packet_counts(SLOTHD_PACKET *pkt) {
/* Scan through the interface table. */
pkt
->
ifcnt
=
0
;
for
(
i
=
0
;
i
<
min
(
iftable
->
dwNumEntries
,
MAXNUMIFACES
)
;
i
++
)
{
for
(
i
=
0
;
i
<
iftable
->
dwNumEntries
&&
pkt
->
ifcnt
<
MAXNUMIFACES
;
i
++
)
{
ifrow
=
&
(
iftable
->
table
[
i
]);
if
(
ifrow
->
dwType
!
=
MIB_
IF_TYPE_
LOOPB
AC
K
&&
/*
Exclude loopback
. */
ifrow
->
dwOperStatus
==
MIB_
IF_OPER_STATUS_OPERATIONAL
)
{
if
(
ifrow
->
dwType
=
=
IF_TYPE_
ETHERNET_CSM
AC
D
&&
/*
Only Ethernet
. */
ifrow
->
dwOperStatus
==
IF_OPER_STATUS_OPERATIONAL
)
{
/* Format the MAC address. We don't have ether_ntoa(). */
snprintf
(
pkt
->
ifaces
[
pkt
->
ifcnt
].
addr
,
MACADDRLEN
,
snprintf
(
cur
addr
,
MACADDRLEN
,
"%02x:%02x:%02x:%02x:%02x:%02x"
,
ifrow
->
bPhysAddr
[
0
],
ifrow
->
bPhysAddr
[
1
],
ifrow
->
bPhysAddr
[
2
],
ifrow
->
bPhysAddr
[
3
],
ifrow
->
bPhysAddr
[
4
],
ifrow
->
bPhysAddr
[
5
]);
/* Skip over bogus interfaces (WAN, filters, etc.). What a mess... */
descr
=
strndup
((
char
*
)
ifrow
->
bDescr
,
ifrow
->
dwDescrLen
);
if
(
!
descr
)
{
lerror
(
"Memory allocation failed!"
);
exit
(
1
);
}
for
(
j
=
0
;
filters
[
j
]
!=
NULL
;
j
++
)
{
if
(
strstr
(
descr
,
filters
[
j
])
!=
NULL
)
{
break
;
}
}
free
(
descr
);
if
(
filters
[
j
])
{
continue
;
}
if
(
opts
->
debug
)
printf
(
"macaddr: %s
\n
"
,
pkt
->
ifaces
[
pkt
->
ifcnt
].
addr
);
printf
(
"macaddr: %s
\n
"
,
cur
addr
);
/* Grumble. ifrow->wszName is empty.
/* Grumble. ifrow->wszName is empty.
<- Not in Win7.
* Recognize the control interface by its MAC address.
*/
if
(
strncmp
(
pkt
->
ifaces
[
pkt
->
ifcnt
].
addr
,
parms
->
cifaddr
,
MACADDRLEN
)
==
0
)
if
(
strncmp
(
cur
addr
,
parms
->
cifaddr
,
MACADDRLEN
)
==
0
)
strncpy
(
pkt
->
ifaces
[
pkt
->
ifcnt
].
ifname
,
parms
->
cifname
,
MAXIFNAMELEN
);
else
/* If it isn't the control interface, just show the MAC address. */
strncpy
(
pkt
->
ifaces
[
pkt
->
ifcnt
].
ifname
,
parms
->
cifaddr
,
MAXIFNAMELEN
);
if
(
opts
->
debug
)
printf
(
"ifname: %s
\n
"
,
pkt
->
ifaces
[
pkt
->
ifcnt
].
ifname
);
strncpy
(
pkt
->
ifaces
[
pkt
->
ifcnt
].
ifname
,
curaddr
,
MAXIFNAMELEN
);
/* Make certain the interface name is null terminated. */
pkt
->
ifaces
[
pkt
->
ifcnt
].
ifname
[
MAXIFNAMELEN
-
1
]
=
'\0'
;
/* Now it's time to save off the MAC address of the current entry. */
strncpy
(
pkt
->
ifaces
[
pkt
->
ifcnt
].
addr
,
curaddr
,
MACADDRLEN
);
pkt
->
ifaces
[
pkt
->
ifcnt
].
addr
[
MACADDRLEN
-
1
]
=
'\0'
;
if
(
opts
->
debug
)
{
printf
(
"ifacename: %ls
\n
"
,
ifrow
->
wszName
);
printf
(
"Description: %*s
\n
"
,
(
int
)
ifrow
->
dwDescrLen
,
ifrow
->
bDescr
);
}
/* Packet counters, including unicast, broadcast, and multicast. */
pkt
->
ifaces
[
pkt
->
ifcnt
].
ipkts
=
...
...
clientside/sensors/slothd/slothd.h
View file @
5a3e106a
...
...
@@ -83,6 +83,7 @@ typedef struct {
char
*
cifname
;
#ifdef __CYGWIN__
char
*
cifaddr
;
u_int
numcpu
;
#endif
/* __CYGWIN__ */
u_char
dolast
;
time_t
lastrpt
;
...
...
@@ -134,4 +135,8 @@ int clear_ttys(void);
int
add_tty
(
char
*
);
int
enum_ttys
(
void
);
#ifdef __CYGWIN__
int
get_ldavg
(
char
*
,
void
*
);
#endif
#endif
/* #ifndef _SLOTHD_H */
clientside/tmcc/GNUmakefile.in
View file @
5a3e106a
...
...
@@ -26,6 +26,10 @@ CFLAGS += -O -g -Wall -DUDP \
-I${TESTBED_LIBSRCDIR}/libtb \
-I${TESTBED_LIBSRCDIR}/tmcd \
-L/usr/local/lib
ifeq ($(SYSTEM),Cygwin)
CFLAGS += -L/usr/lib/w32api
endif
TMLIBS = ${TESTBED_LIBOBJDIR}/tmcd/libtmcc.a
TMLIBS += ${TESTBED_LIBOBJDIR}/libtb/libtb.a
LDFLAGS += $(LDSTATIC)
...
...
@@ -103,10 +107,15 @@ endif
endif
ifeq ($(SYSTEM),Cygwin)
TMLIBS += -liphlpapi
# Cygwin on Windows XP (a.k.a. NT 5.1) - resembles the Linux case.
ifeq ($(MD
SUBDIR),CYGWIN_NT-
5.1)
ifeq ($(MD
REL),
5.1)
MDSUBDIR = cygwinxp
TMSLIBS += -lminires
else
# Cygwin on Windows 7 (a.k.a. NT 6.1) - resembles the Linux case.
ifeq ($(MDREL),6.1)
MDSUBDIR = cygwinseven
endif
endif
endif
...
...
@@ -118,7 +127,7 @@ tmcc-shared: tmcc.c tmcd.h $(TPMLIB)
$(CC) $(CFLAGS) $(SSLFLAGS) -g -o tmcc $< $(LFLAGS) $(TMLIBS)
tmcc-nossl-debug: tmcc.c tmcd.h
$(CC) $(CFLAGS) $(LDSTATIC) -g -o $@ $< $(LFLAGS) $(TM
S
LIBS)
$(CC) $(CFLAGS) $(LDSTATIC) -g -o $@ $< $(LFLAGS) $(TMLIBS)
findif-debug: findif.o
$(CC) $(CFLAGS) -g -o $@ findif.o $(LFLAGS) $(LDSTATIC)
...
...
clientside/tmcc/common/config/rc.accounts
View file @
5a3e106a
...
...
@@ -424,7 +424,7 @@ sub doboot()
#
# Anytime the home dir is on a local FS ...
#
if
(
$doit
&&
$doupdate
)
{
if
(
$doit
&&
$doupdate
&&
!
WINDOWS
()
)
{
#
# Must ask for the current home dir since we rely on pw.conf.
#
...
...
clientside/tmcc/cygwinseven/GNUmakefile.in
0 → 100755
View file @
5a3e106a
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
#
#
# XXX ONLY RUN THIS INSTALL ON A CYGWIN / WINDOWS XP NODE!
# Similar to linux9, cygwinseven is an overlay on linux, which is an overlay
# on common.
#
# Trivial. These things just need to be installed into the right place
# on a testbed node before cutting an image.
#
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
include $(OBJDIR)/Makeconf
SCRIPTS =
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: $(SCRIPTS)
include $(TESTBED_SRCDIR)/GNUmakerules
DESTDIR =
SYSETCDIR = $(DESTDIR)/etc
ETCDIR = $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR = $(DESTDIR)$(CLIENT_BINDIR)
VARDIR = $(DESTDIR)$(CLIENT_VARDIR)
RCDIR = $(SYSETCDIR)/rc.d
INSTALL = /usr/bin/install -c
COMMON = $(SRCDIR)/../common
WINDOWS = /cygdrive/c/Windows
SYSTEM32 = $(WINDOWS)/System32
WBEM = $(SYSTEM32)/Wbem
SYSPREP = $(SYSTEM32)/sysprep
SPSCRIPTS = $(WINDOWS)/Setup/Scripts
install client-install: baselinux-install common-install etc-install \
sup-install script-install ##bin-install
@echo "Remember to install the PEM files if necessary"
simple-install: common-install script-install ##bin-install
dir-install:
baselinux-install: dir-install
(cd ../linux; $(MAKE) DIRGROUP=wheel client-install)
rm -f $(BINDIR)/rc/rc.healthd
rm -f $(BINDIR)/rc/rc.slothd
common-install: dir-install
(cd ../common; $(MAKE) local-install)
sup-install: dir-install
bin-install: dir-install
# These are found in the /share/windows directory.
$(INSTALL) -m 755 $(SRCDIR)/WSName.exe $(BINDIR)/WSName.exe
$(INSTALL) -m 755 $(SRCDIR)/addusers.exe $(BINDIR)/addusers.exe
$(INSTALL) -m 755 $(SRCDIR)/usrtogrp.exe $(BINDIR)/usrtogrp.exe
# Setx is run under CMD early in the user login to make HOME for Emacs.
$(INSTALL) -m 755 $(SRCDIR)/setx.exe $(SYSTEM32)/setx.exe
# Devcon is used by rc.cygwin and rc.ifc to disable/enable NIC's.
$(INSTALL) -m 755 $(SRCDIR)/devcon.exe $(BINDIR)/devcon.exe
# These are used by tmcd/findif.
$(INSTALL) -m 755 $(SYSTEM32)/getmac.exe $(BINDIR)/getmac.exe
$(INSTALL) -m 755 $(WBEM)/framedyn.dll $(BINDIR)/framedyn.dll
etc-install: dir-install sysetc-install
sysetc-install: dir-install ###ifcfgs
# Watchdog assumes the ssh keys are in /etc/ssh.
mkdir -p /etc/ssh
ln -f -s /etc/ssh* /etc/ssh
# 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
$(INSTALL) -m 755 $(SRCDIR)/prepare $(BINDIR)/prepare
$(INSTALL) -m 755 $(SRCDIR)/tbshutdown $(BINDIR)/tbshutdown
$(INSTALL) -c -m 755 -o root -d /sbin
#$(INSTALL) -m 755 $(SRCDIR)/reboot /sbin/reboot
# Put the tcsh desktop startup script in the CygWin root directory.
#$(INSTALL) -m 755 $(SRCDIR)/cygwin-tcsh.bat /
ln -f -s /bin/shutdown /sbin/shutdown
ln -f -s /bin/reboot /sbin/reboot
# Everybody is in the Administrators group already, so sudo is irrelevant.
$(INSTALL) -m 755 $(SRCDIR)/sudo.dummy /bin/sudo
#$(INSTALL) -m 755 $(SRCDIR)/rc.firstboot $(BINDIR)/rc/rc.firstboot
$(INSTALL) -m 755 $(SRCDIR)/rc.cygwinseven $(BINDIR)/rc/rc.cygwin
#$(INSTALL) -m 755 $(SRCDIR)/clean_logonui $(BINDIR)/clean_logonui
$(INSTALL) -m 755 $(SRCDIR)/rc.reboot $(BINDIR)/rc/rc.reboot
$(INSTALL) -m 755 $(SRCDIR)/rc.lmhosts $(BINDIR)/rc/rc.lmhosts
$(INSTALL) -m 755 $(SRCDIR)/netbt $(BINDIR)/netbt
$(INSTALL) -m 755 $(SRCDIR)/unattend-x86.xml $(SYSPREP)/unattend-src.xml
$(INSTALL) -c -m 755 -o Administrators -d $(SPSCRIPTS)
$(INSTALL) -m 755 $(SRCDIR)/setupnode.ps1 $(SPSCRIPTS)/setupnode.ps1
$(INSTALL) -m 755 $(SRCDIR)/SetupComplete.cmd $(SPSCRIPTS)/SetupComplete.cmd
$(INSTALL) -m 755 $(SRCDIR)/reboot.sh /bin/reboot