Commit 0f0688ed authored by Leigh Stoller's avatar Leigh Stoller

A bunch of small makefile and path changes to reflect new locations

of stuff in the new image. Also added client side install targets
every place I could think of.
parent 10c527db
......@@ -54,6 +54,10 @@ install:
client-install:
@$(MAKE) -C nsetrafgen client-install
@$(MAKE) -C delay-agent client-install
@$(MAKE) -C program-agent client-install
@$(MAKE) -C tbgen client-install
@$(MAKE) -C trafgen client-install
control-install:
@$(MAKE) -C tbgen control-install
......
......@@ -33,7 +33,7 @@ delay-agent: $(OBJS)
$(OBJS): main.h ../lib/libevent.a
client-install:
$(INSTALL_PROGRAM) delay-agent /etc/testbed/delay_agent
$(INSTALL_PROGRAM) delay-agent $(DESTDIR)$(CLIENT_BINDIR)/delay-agent
clean:
/bin/rm -f *.o delay-agent
......@@ -28,9 +28,16 @@ include $(TESTBED_SRCDIR)/GNUmakerules
buildnse:
cd $(SRCDIR); $(SRCDIR)/nse-install
sup-install:
cp -p $(INSTALL_FILES) $(INSTALL_SUPDIR)$(CLIENT_BINDIR)
cp -p $(INSTALL_NSE) $(INSTALL_SUPDIR)/usr/local/bin
client-install:
cp $(INSTALL_FILES) $(INSTALL_SUPDIR)/etc/testbed
cp $(INSTALL_NSE) $(INSTALL_SUPDIR)/usr/local/bin
cp -p $(INSTALL_FILES) $(DESTDIR)$(CLIENT_BINDIR)
if [ -x $(INSTALL_NSE) ]; then \
$(INSTALL) -m 755 -o root -g wheel -d $(DESTDIR)/usr/local/bin; \
cp -p $(INSTALL_NSE) $(DESTDIR)/usr/local/bin; \
fi
clean:
/bin/rm -f $(INSTALL_NSE)
#!/etc/testbed/nse
#!/usr/localetc/emulab/nse
#
# EMULAB-COPYRIGHT
......@@ -36,7 +36,7 @@ proc getipaddr {name} {
# returns the interface name for ipaddr
proc getif {ipaddr} {
set tmccifconfig [open /etc/testbed/tmcc.ifconfig r]
set tmccifconfig [open /var/emulab/tmcc.ifconfig r]
set ifconf [read $tmccifconfig]
close $tmccifconfig
set ifconfiglist [split $ifconf "\n"]
......@@ -53,7 +53,7 @@ proc getif {ipaddr} {
proc getmac {ipaddr} {
set tmccifconfig [open /etc/testbed/tmcc.ifconfig r]
set tmccifconfig [open /var/emulab/tmcc.ifconfig r]
set ifconf [read $tmccifconfig]
close $tmccifconfig
set ifconfiglist [split $ifconf "\n"]
......@@ -76,7 +76,7 @@ proc getmac {ipaddr} {
# This is temporary. Needs to be done from libsetup.pm
proc installipfwfwd {} {
set tmccroutelist [open /etc/testbed/tmcc.routelist r]
set tmccroutelist [open /var/emulab/tmcc.routelist r]
set routeliststr [read $tmccroutelist]
close $tmccroutelist
......@@ -121,7 +121,7 @@ proc findcpuspeed {} {
# store a list of routes for all source nodes that are
# in this simulation
set tmccnseconfigs [open /etc/testbed/tmcc.nseconfigs r]
set tmccnseconfigs [open /var/emulab/tmcc.nseconfigs r]
set nseconfig [read $tmccnseconfigs]
close $tmccnseconfigs
......@@ -219,9 +219,9 @@ if { $nsetrafgen_present == 1 } {
# for each entry in `tmcc trafgens` that has NSE as the generator
# configure that object to connect to a newly created
# TCPTap along with the required Live and RAW IP objects. Set the filter and interface
# after learning it from tmcc commands and other scripts in /etc/testbed
# after learning it from tmcc commands and other scripts in /var/emulab
set tmcctrafgens [open /etc/testbed/tmcc.trafgens r]
set tmcctrafgens [open /var/emulab/tmcc.trafgens r]
set tmcctraf [read $tmcctrafgens]
close $tmcctrafgens
set trafgenlist [split $tmcctraf "\n"]
......@@ -340,7 +340,7 @@ if { $simcode_present == 1 } {
# get some params to configure the event system interface
if { $objnamelist != {} } {
set tmccbossinfo [open /etc/testbed/tmcc.bossinfo r]
set tmccbossinfo [open /var/emulab/tmcc.bossinfo r]
set tmccboss [read $tmccbossinfo]
close $tmccbossinfo
set boss [lindex [split $tmccboss " "] 0]
......
#!/etc/testbed/nse
#!/usr/localetc/emulab/nse
#
# EMULAB-COPYRIGHT
......@@ -36,7 +36,7 @@ proc getipaddr {name} {
# returns the interface name for ipaddr
proc getif {ipaddr} {
set tmccifconfig [open /etc/testbed/tmcc.ifconfig r]
set tmccifconfig [open /var/emulab/tmcc.ifconfig r]
set ifconf [read $tmccifconfig]
close $tmccifconfig
set ifconfiglist [split $ifconf "\n"]
......@@ -53,7 +53,7 @@ proc getif {ipaddr} {
proc getmac {ipaddr} {
set tmccifconfig [open /etc/testbed/tmcc.ifconfig r]
set tmccifconfig [open /var/emulab/tmcc.ifconfig r]
set ifconf [read $tmccifconfig]
close $tmccifconfig
set ifconfiglist [split $ifconf "\n"]
......@@ -76,7 +76,7 @@ proc getmac {ipaddr} {
# This is temporary. Needs to be done from libsetup.pm
proc installipfwfwd {} {
set tmccroutelist [open /etc/testbed/tmcc.routelist r]
set tmccroutelist [open /var/emulab/tmcc.routelist r]
set routeliststr [read $tmccroutelist]
close $tmccroutelist
......@@ -121,7 +121,7 @@ proc findcpuspeed {} {
# store a list of routes for all source nodes that are
# in this simulation
set tmccnseconfigs [open /etc/testbed/tmcc.nseconfigs r]
set tmccnseconfigs [open /var/emulab/tmcc.nseconfigs r]
set nseconfig [read $tmccnseconfigs]
close $tmccnseconfigs
......@@ -219,9 +219,9 @@ if { $nsetrafgen_present == 1 } {
# for each entry in `tmcc trafgens` that has NSE as the generator
# configure that object to connect to a newly created
# TCPTap along with the required Live and RAW IP objects. Set the filter and interface
# after learning it from tmcc commands and other scripts in /etc/testbed
# after learning it from tmcc commands and other scripts in /var/emulab
set tmcctrafgens [open /etc/testbed/tmcc.trafgens r]
set tmcctrafgens [open /var/emulab/tmcc.trafgens r]
set tmcctraf [read $tmcctrafgens]
close $tmcctrafgens
set trafgenlist [split $tmcctraf "\n"]
......@@ -340,7 +340,7 @@ if { $simcode_present == 1 } {
# get some params to configure the event system interface
if { $objnamelist != {} } {
set tmccbossinfo [open /etc/testbed/tmcc.bossinfo r]
set tmccbossinfo [open /var/emulab/tmcc.bossinfo r]
set tmccboss [read $tmccbossinfo]
close $tmccbossinfo
set boss [lindex [split $tmccboss " "] 0]
......
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
#
......@@ -14,31 +12,12 @@ use English;
# usage: startnse &
#
#
# Untaint path
#
$ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/local/bin:/etc/testbed';
$ENV{'TCL_LIBRARY'} = '/etc/testbed';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use lib "/etc/testbed";
use libsetup;
#
# We use the tmcc to figure out where the Testbed Event Daemon is running.
# Don't worry about the port for now.
#
#my ($bossname, $bossipaddr) = split(" ", `tmcc bossinfo`);
# Drag in path stuff so we can find emulab stuff.
BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
# 1. sysctl tcp blackhole to 2. Done in nseinput.tcl
# 2. create lots of BPF devices
# Stuff is here now.
chdir $BINDIR;
chdir "/etc/testbed";
$id = `id`;
($vnode,$eid,$pid) = split (/\./, `hostname`);
$logpath = "/proj/$pid/exp/$eid/logs/nse-$vnode.log";
......
......@@ -34,7 +34,8 @@ $(PROGRAMS): ../lib/libevent.a ../lib/event.h
install:
client-install:
$(INSTALL_PROGRAM) program-agent /etc/testbed/program-agent
$(INSTALL_PROGRAM) program-agent \
$(DESTDIR)$(CLIENT_BINDIR)/program-agent
clean:
/bin/rm -f *.o $(PROGRAMS)
......@@ -49,7 +49,7 @@ install: $(INSTALL_SBINDIR)/tevd \
control-install: $(INSTALL_BINDIR)/tevc
client-install:
$(INSTALL_PROGRAM) tevc /etc/testbed/tevc
$(INSTALL_PROGRAM) tevc $(DESTDIR)$(CLIENT_BINDIR)/tevc
clean:
/bin/rm -f *.o $(PROGRAMS)
......@@ -75,6 +75,9 @@ $(PROGRAMS): ../lib/libevent.a ../lib/event.h
install:
client-install:
$(INSTALL_PROGRAM) trafgen $(DESTDIR)$(CLIENT_BINDIR)/trafgen
clean:
/bin/rm -f lex.yy.c y.* *.o $(PROGRAMS)
......
......@@ -9,6 +9,8 @@ TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = os
LBINDIR = $(DESTDIR)/usr/local/bin
include $(OBJDIR)/Makeconf
SUBDIRS = imagezip frisbee.redux growdisk
......@@ -31,10 +33,12 @@ control-install:
@$(MAKE) -C imagezip install
client-install:
$(INSTALL_PROGRAM) create-delta /usr/local/bin/create-delta
$(INSTALL_PROGRAM) install-delta /usr/local/bin/install-delta
$(INSTALL_PROGRAM) install-tarfile /usr/local/bin/install-tarfile
$(INSTALL_PROGRAM) create-image /usr/local/bin/create-image
$(INSTALL) -m 755 -o root -g wheel -d $(LBINDIR)
$(INSTALL_PROGRAM) $(SRCDIR)/create-delta $(LBINDIR)/create-delta
$(INSTALL_PROGRAM) $(SRCDIR)/install-delta $(LBINDIR)/install-delta
$(INSTALL_PROGRAM) $(SRCDIR)/install-tarfile $(LBINDIR)/install-tarfile
$(INSTALL_PROGRAM) $(SRCDIR)/create-image $(LBINDIR)/create-image
$(MAKE) -C imagezip client-install
clean: subdir-clean
......
......@@ -7,7 +7,7 @@
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = os/imagezip
SUBDIR = os/imagezip.redux
WITH_NTFS = @WINSUPPORT@
......
......@@ -14,7 +14,8 @@ SBIN_SCRIPTS = sdisrunning sddeploy
include $(OBJDIR)/Makeconf
CC?=gcc
CFLAGS+= -Wall -I${OBJDIR} -I/usr/local/include -I$(TESTBED_SRCDIR)/lib/libtb
CFLAGS+= -Wall -I${OBJDIR} -I/usr/local/include -I$(TESTBED_SRCDIR)/lib/libtb \
-DCLIENT_BINDIR='"$(CLIENT_BINDIR)"'
LDFLAGS+= -L${OBJDIR}/lib/libtb -L/usr/local/lib/mysql
SDLIBS+= -ltb -lmysqlclient
LIBS=
......
......@@ -5,6 +5,12 @@
# All rights reserved.
#
#
# Confiigure variables
#
my $CLIENT_BINDIR = "@CLIENT_BINDIR@";
my $CLIENT_ETCDIR = "@CLIENT_ETCDIR@";
use lib '@prefix@/lib';
use libdb;
......@@ -28,8 +34,8 @@ if (@ARGV < 1) {
my $linpath = "~kwebb/src/testbed/sensors/slothd/linux/slothd";
my $fbsdpath = "~kwebb/src/testbed/sensors/slothd/fbsd/slothd";
my $linrcpath = "~kwebb/src/testbed/tmcd/linux/rc.testbed";
my $fbsdrcpath = "~kwebb/src/testbed/tmcd/freebsd/rc.testbed";
my $linrcpath = "~kwebb/src/testbed/tmcd/common/rc.testbed";
my $fbsdrcpath = "~kwebb/src/testbed/tmcd/common/rc.testbed";
my $SSH = "sudo ssh -q";
my $SCP = "sudo scp -q -o Loglevel=QUIET";
......@@ -102,16 +108,16 @@ sub InstallSlothd($) {
print "stopping slothd on $node\n";
`$SSH $node killall slothd`;
sleep 1;
`$SCP $linpath $node:/etc/rc.d/testbed`;
`$SCP $linrcpath $node:/etc/rc.d/testbed`;
`$SCP $linpath $node:$CLIENT_BINDIR`;
`$SCP $linrcpath $node:$CLIENT_BINDIR`;
}
elsif ($nodeos =~ /freebsd/i) {
print "Node type is FreeBSD\n";
print "stopping slothd on $node\n";
`$SSH $node killall slothd`;
sleep 1;
`$SCP $fbsdpath $node:/etc/testbed`;
`$SCP $fbsdrcpath $node:/etc/testbed`;
`$SCP $fbsdpath $node:$CLIENT_BINDIR`;
`$SCP $fbsdrcpath $node:$CLIENT_BINDIR`;
}
else {
print "Unknown node OS: $nodeos: not deploying.\n";
......@@ -119,7 +125,7 @@ sub InstallSlothd($) {
}
print "starting slothd on $node\n";
`$SSH $node /etc/testbed/slothd`;
`$SSH $node $CLIENT_BINDIR/slothd`;
if ($?) {
return 1;
}
......
......@@ -5,6 +5,12 @@
# All rights reserved.
#
#
# Confiigure variables
#
my $CLIENT_BINDIR = "@CLIENT_BINDIR@";
my $CLIENT_ETCDIR = "@CLIENT_ETCDIR@";
use lib '@prefix@/lib';
use libdb;
......@@ -95,7 +101,7 @@ sub check {
my $ssh="sshtb -q";
my $node = shift;
my $cmd1 = "ps auxwww | grep slothd | grep -v grep";
my $cmd2 = "'rm -f /tmp/.sdpid ; /etc/testbed/slothd'";
my $cmd2 = "'rm -f /tmp/.sdpid ; ${CLIENT_BINDIR}/slothd'";
# Run an ssh command in a child process, protected by an alarm to
# ensure that the ssh is not hung up forever if the machine is in
# some funky state.
......
......@@ -37,7 +37,7 @@
#include <sys/ioctl.h>
#endif
#define SLOTHD_PATH_ENV "/bin:/usr/bin:/sbin:/usr/sbin:/etc/testbed"
#define SLOTHD_PATH_ENV "/bin:/usr/bin:/sbin:/usr/sbin:" CLIENT_BINDIR
#define UTMP_PATH "/var/run/utmp"
#define WTMP_PATH "/var/log/wtmp"
#define PIDFILE "/var/run/slothd.pid"
......
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