Index: fedkit/HOWTO
===================================================================
--- fedkit/HOWTO	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,89 +1,0 @@
-
-Using the DETER federation tools
-
-Setup
-
-You will need your own copy of the configuration files and scripts that
-are exported to remote federated testbeds.  This file is available from 
-
-http://www.isi.edu/~faber/tmp/federation.tgz
-
-The contents of this file are:
-
-federation/HOWTO			This file
-federation/fed-tun.pl			Tunnel establishment script
-federation/federate.sh			Client testbed node init script
-federation/make_hosts			Master testbed node init script
-federation/smbmount.pl			Script to mount SMB filesystems
-					on client nodes, called from
-					federate.sh
-federation/splitter.conf.example	Example splitter configuration file
-federation/splitter.pl			Main federation script
-federation/testbeds.example		Exmaple testbeds config file
-
-federation/testlan.tcl			Example federated topology
-
-You'll also need acces to a tunneling image and a SMB-enabled image for
-clients.  Currently these are FBSD61-TUNNEL2 and FBSD62-SMB on DETER in
-the emulab-ops project.  Identical images are in DETER and Deter on
-Emulab and WAIL.  Eventually federating testbeds will make those images
-available to users permitted to federate, but that policy is not in
-place.
-
-Configuration files
-
-There are two configuration files:
-
-testbeds	The testbeds that can be federated and their parameters
-splitter.conf	The per-experiment parameters (e.g. remote experiment name)
-
-These are documented in the pod documentation for splitter.  You can
-view that by:
-
-$ pod2man testbed/federation/splitter.pl | groff -man -Tascii | more
-
-You should be able to use testbeds.example almost completely unchanged.
-You will need to change the User parameter to your username on the
-various testbeds.  If you're not using the same projects on the various
-testbeds (DETER: emulab-ops, WAIL: Deter, Emulab: Deter) those will need
-to change as well.  Otherwise the defaults should work for you.
-
-Similarly, the splitter.conf.example file is mostly usable.  Change the
-experiment name to avoid collisions.  (The split experiment will be
-instantiated using that experiment name on each federated testbed, so it
-could collide with others in use).  Make sure the Testbeds parameter
-points to the testbeds file you created above and that the ScriptDir
-parameter points to the directory that you untarred federation.tgz into.
-Just for completeness change the SMBUser to your UID.  The USERS share
-should work for you.  It is the share that is exported to remote
-testbeds.
-
-Creating an experiment
-
-You have to run splitter on users.isi.deterlab.net.  It depends on a
-modified experiment parser that is not widely available, but installed
-on users.
-
-To use the given experiment (testlan.tcl) you should be able to run
-splitter directly.  I use something like:
-
-$ perl ./splitter.pl -v testlan.tcl
-
-You will be able to watch each testbed swap nodes in on the individual
-testbeds.
-
-To split an existing experiment across multiple testbeds, you need to
-use the command
-
-tb-set-node-testbed node "testbed"
-
-The node is the result of the [ $ns node ] command and the testbed is a
-string that matches an entry in your testbeds file.  Note that DETER has
-only 2 connectors and any connection or LAN between nodes on different
-testbeds will use up a connector.  Actually up to 2 connections can be
-multiplexed on a connector.
-
-Right now, to ensure cross testbed routing works and that the master
-testbed files are exported, use FBSD62-SMB as the image on clients.
-
-Let me know if you have questions.  faber@isi.edu
Index: fedkit/Makefile
===================================================================
--- fedkit/Makefile	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,24 +1,0 @@
-BINARIES=federate.sh federate.pl smbmount.FreeBSD.pl smbmount.Linux.pl \
-	 make_hosts fed-tun.pl fed_evrepeater rc.fedaccounts \
-	 config_from_tunnelip.pl active_config.pl combo.pl \
-	 prep_gateway.pl port_forward.pl setup_bridge.pl import_key.pl \
-	 gated_routing.pl start_seer.pl ospf_routing.pl quagga_routing.pl \
-	 static_routing.pl unsetup_bridge.pl
-
-LIBRARIES=gateway_lib.pm 
-
-PACKAGES=libevent-1.3b.tbz openospfd-4.0.tbz
-
-fedkit.tgz:	${LIBRARIES} ${BINARIES} ${PATCHES} ${PACKAGES}
-	mkdir -p /tmp/fedkit/local/federation/bin
-	mkdir -p /tmp/fedkit/local/federation/lib
-	mkdir -p /tmp/fedkit/local/federation/etc
-	mkdir -p /tmp/fedkit/local/federation/pkg
-	cp ${BINARIES} /tmp/fedkit/local/federation/bin
-	cp ${LIBRARIES} /tmp/fedkit/local/federation/lib
-	cp ${PACKAGES} /tmp/fedkit/local/federation/pkg
-	tar czf fedkit.tgz -C /tmp/fedkit local
-	rm -rf /tmp/fedkit
-
-clean:
-	rm -f fedkit.tgz
Index: fedkit/active_config.pl
===================================================================
--- fedkit/active_config.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,167 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-use gateway_lib;
-
-use IO::File;
-
-use Getopt::Long;
-
-my $ssh_pubkey;
-my $ssh_privkey;
-my $tunnelip;
-my $peer;
-my $fedkit_dir= "/usr/local/federation";
-my $perl = "/usr/bin/perl";
-my $iface_file = "/var/emulab/boot/ifmap";
-my $ssh = "/usr/bin/ssh";
-my $scp = "/usr/bin/scp";
-my $ssh_port = 22;
-my $use_file;
-
-my %opts = (
-    'ssh_pubkey=s' => \$ssh_pubkey,
-    'ssh_privkey=s' => \$ssh_privkey,
-    'tunnelip' => \$tunnelip,
-    'peer=s' => \$peer,
-    'fedkit=s' => \$fedkit_dir,
-    'perl=s' => \$perl,
-    'interfaces=s' => \$iface_file,
-    'ssh=s' => \$ssh,
-    'scp=s' => \$scp,
-    'ssh_port=s' => \$ssh_port,
-    'use_file' => \$use_file,
-);
-
-exit(20) unless GetOptions(%opts);
-
-gateway_lib::read_config(gateway_lib::config_filename(), \%opts)
-    if $use_file;
-
-my $tunnelparam = $tunnelip ? '--tunnelip' : '';
-
-system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/prep_gateway.pl --peer=$peer " .
-    "--ssh_pubkey=$ssh_pubkey $tunnelparam");
-exit(20) if $?;
-
-
-print "Waiting for ssh on $peer\n";
-# XXX: should be $ssh_port?
-gateway_lib::wait_for_port($peer, 22, 60*60) || 
-    die "ssh never came up on $peer\n";
-my $coord_fn = "$fedkit_dir/etc/prep_done";
-print "Making sure ssh permissions are reset (fetching $coord_fn)\n";
-gateway_lib::testcmd_repeat("$scp -o \"StrictHostKeyChecking no\" " .
-    "-i $ssh_privkey $peer:$coord_fn /tmp", 5*60);
-
-if (my $f = new IO::File($iface_file)) {
-    my $ifnum = 0;
-    while (<$f>) {
-	/([[:alnum:]]+)\s+([\d\.]+)/ && do {
-	    my ($iface, $addr) = ($1, $2);
-
-	    my $cmd = "$ssh -w $ifnum:$ifnum -p $ssh_port " . 
-		"-o \"Tunnel ethernet\" -o \"StrictHostKeyChecking no\" " .
-		"-i $ssh_privkey $peer perl -I$fedkit_dir/lib ".
-		"$fedkit_dir/bin/setup_bridge.pl --tapno=$ifnum --dest=$addr &";
-	    system($cmd);
-	    die if $?;
-	    gateway_lib::bind_tap_to_iface($ifnum, $iface, $addr);
-	    $ifnum++;
-	};
-    }
-    $f->close();
-}
-else {
-    warn "Can't open $iface_file: $!\n";
-}
-exit(0);
-
-=pod
-
-=head1 NAME
-
-B<active_config.pl> - Configure an active connectivity gateway under the DETER Federation Architecture
-
-=head1 OPTIONS
-
-=over 8
-
-=item B<fedkit=>I<install_dir>
-
-Directory in which this software is installed.  Generally not needed.
-
-=item B<interfaces=>I<interface table>
-
-A list of interfaces to forward data on of the form:
-
-=begin text
-
-iface ip_addr
-
-=end text
-
-The interface is the operating system name of the interface and the IP address
-is given in standard dotted decimal notation.  Other characters on a line are
-ignored.
-
-=item B<peer=>I<hostname>
-
-The other gateway providing forwarding.
-
-=item B<perl=>I<perl_binary>
- 
-Location of the perl binary.  Usually unneeded.
-
-=item B<ssh=>I<ssh_binary>
-
-The pathname of the ssh binary.  Unusally unnecessary.
-
-=item B<ssh_pubkey=>I<keyfile>
-
-A public to install as authorized.
-
-=item B<ssh_privkey=>I<identity_file>
-
-The identity to use for remote access
-
-=item B<tunnelip>
-
-True if the testbed uses the DETER tunnelip extension to provide external
-connectivity information
-
-=item B<use_file>
-
-If given read additional parameters from the file in
-/proj/I<project>/exp/I<experiment>/tmp/I<hostname>.gw/conf where those are the
-current testbed project and experiment and the hostname is before the first
-dot.  The file is option: value.
-
-
-=back
-
-=head1 SYNOPSIS
-
-B<active_config.pl> initiates the active side of the connectivity connection,
-which is to say that it:
-
-=over 4
-
-=item *
-
-Installs local keys and reconfigures that local ssh system to do link layer
-tunneling.
-
-=item *
-
-Starts a tunnel for each interface in the given interface table, both locally
-and remotely.
-
-=back
-
-=head1 AUTHORS
-
-Ted Faber <faber@isi.edu>
-
-=cut
Index: fedkit/combo.pl
===================================================================
--- fedkit/combo.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,159 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-use gateway_lib;
-
-use IO::File;
-
-use Getopt::Long;
-
-my $ssh_pubkey;
-my $ssh_privkey;
-my $active;
-my $tunnelip;
-my $peer;
-my $fedkit_dir= "/usr/local/federation";
-my $perl = "/usr/bin/perl";
-my $iface_file = "/var/emulab/boot/ifmap";
-my $ssh = "/usr/bin/ssh";
-my $seer;
-my $ssh_port = 22;
-my @ports;
-my $use_file;
-
-my %opts = (
-    'ssh_pubkey=s' => \$ssh_pubkey,
-    'ssh_privkey=s' => \$ssh_privkey,
-    'tunnelip' => \$tunnelip,
-    'peer=s' => \$peer,
-    'fedkit=s' => \$fedkit_dir,
-    'perl=s' => \$perl,
-    'interfaces=s' => \$iface_file,
-    'ssh=s' => \$ssh,
-    'port=s' => \@ports,
-    'active' => \$active, 
-    'ssh_port=s' => \$ssh_port,
-    'use_file' => \$use_file,
-    'seer' => \$seer,
-);
-
-exit(20) unless GetOptions(%opts);
-
-if ($use_file) {
-    gateway_lib::read_config(gateway_lib::config_filename(), \%opts)
-}
-
-my $tunnelparam = $tunnelip ? '--tunnelip' : '';
-
-# Private keys need to have restrictive permissions
-chmod(0600, $ssh_privkey);
-if ($active) {
-    my $portparam = join(" --port=", @ports);
-
-    # join doesn't prefix the first one
-    $portparam="--port=$portparam" if $portparam;
-
-    system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/active_config.pl " .
-	"--peer=$peer --ssh_pubkey=$ssh_pubkey --ssh_privkey=$ssh_privkey " .
-	" $tunnelparam --fedkit=$fedkit_dir --perl=$perl " .
-	"--ssh_port=$ssh_port --ssh=$ssh --interfaces=$iface_file");
-    exit(20) if $?;
-
-    system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/port_forward.pl " .
-	"--peer=$peer --ssh_pubkey=$ssh_pubkey --ssh_privkey=$ssh_privkey " .
-	" $tunnelparam --fedkit=$fedkit_dir --perl=$perl " .
-	"--ssh=$ssh --ssh_port=$ssh_port $portparam");
-    exit(20) if $?;
-
-    if ($seer ) {
-	system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/start_seer.pl " .
-	    "--peer=$peer --seer --fedkit=$fedkit_dir --perl=$perl " .
-	    "--ssh=$ssh --ssh_privkey=$ssh_privkey");
-	exit(20) if $?;
-    }
-
-}
-else {
-    system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/prep_gateway.pl " . 
-	"--peer=$peer --ssh_pubkey=$ssh_pubkey $tunnelparam");
-    exit(20) if $?;
-}
-
-=pod
-
-=head1 NAME
-
-B<combo_active.pl> - Do both the active configuration of a connectiveity gateway and service port forwarding.
-
-=head1 OPTIONS
-
-=over 8
-
-=item B<fedkit=>I<install_dir>
-
-Directory in which this software is installed.  Generally not needed.
-
-=item B<interfaces=>I<interface table>
-
-A list of interfaces to forward data on of the form:
-
-=begin text
-
-iface ip_addr
-
-=end text
-
-The interface is the operating system name of the interface and the IP address
-is given in standard dotted decimal notation.  Other characters on a line are
-ignored.
-
-=item B<peer=>I<hostname>
-
-The other gateway providing forwarding.
-
-=item B<perl=>I<perl_binary>
- 
-Location of the perl binary.  Usually unneeded.
-
-=item B<port=>I<port_spec>
-
-Forward the given port.  The port is specified as 
-for B<port_forward.pl>
-
-=item B<ssh=>I<ssh_binary>
-
-The pathname of the ssh binary.  Unusally unnecessary.
-
-=item B<ssh_pubkey=>I<keyfile>
-
-A public to install as authorized.
-
-=item B<ssh_privkey=>I<identity_file>
-
-The identity to use for remote access
-
-=item B<tunnelip>
-
-True if the testbed uses the DETER tunnelip extension to provide external
-connectivity information
-
-=item B<use_file>
-
-If given read additional parameters from the file in
-/proj/I<project>/exp/I<experiment>/tmp/I<hostname>.gw/conf where those are the
-current testbed project and experiment and the hostname is before the first
-dot.  The file is option: value.
-
-=back
-
-=head1 SYNOPSIS
-
-Call B<active_config.pl> and B<port_forward.pl> with the relevant parameters.
-
-
-=head1 AUTHORS
-
-Ted Faber <faber@isi.edu>
-
-=cut
Index: fedkit/config_from_tunnelip.pl
===================================================================
--- fedkit/config_from_tunnelip.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,89 +1,0 @@
-#!/usr/bin/perl 
-
-use strict;
-use IO::File;
-use IO::Pipe;
-use Getopt::Long;
-
-# Commands to use below.  These all seem to be in the same place on FreeBSD and
-# Lunix
-my $TMCC = "/usr/local/etc/emulab/tmcc";
-my $FINDIF = "/usr/local/etc/emulab/findif";
-my $IFCONFIG = "/sbin/ifconfig";
-my $ROUTE = "/sbin/route";
-
-my $tmcc = new IO::Pipe || die "Can't create tmcc pipe: $!\n";	# To parse tmcc
-my $interface;			# Interface with external address
-my $ip;				# IP address of external interface
-my $mac;			# MAC address
-my $netmask;			# Netmask
-my $router;			# Router for the internet
-my $routedest;			# Add host route to this address (if given)
-my $recordfile;			# Record interfaces
-my $forceip;			# User overriddedn IP
-my $forcemask;			# User overriddedn netmask
-
-# Linux and FreeBSD use slightly different route syntax, so get the OS
-my $os = `uname`;
-chomp $os;
-
-# Option parsing, --destination sets $routedest
-GetOptions('destination=s' => \$routedest, "record=s" => \$recordfile,
-    'forceip=s' => \$forceip, 'forcemask=s' => \$forcemask);
-
-# Parse out the info about tunnelips
-$tmcc->reader("$TMCC tunnelip");
-while (<$tmcc>) {
-    chomp;
-    /TUNNELIP=([\d\.]*)/ && do { $ip = $1; };
-    /TUNNELMASK=([\d\.]*)/ && do { $netmask = $1; };
-    /TUNNELMAC=([[:xdigit:]]*)/ && do { $mac = $1; };
-    /TUNNELROUTER=([\d\.]*)/ && do { $router = $1; };
-}
-$tmcc->close();
-
-die "No MAC information for tunnel.\n" unless $mac;
-
-# Let the user override the IP and mask if they know what they are doing.
-$ip = $forceip if $forceip;
-$netmask = $forcemask if $forcemask;
-
-# Use the emulab findif command to get the right interface to configure
-$interface = `$FINDIF $mac`;
-chomp $interface;
-die "Can't get interface for mac address $mac: $?" if $? || !$interface;
-
-# Do the ifconfig
-my @ifconfig = ($IFCONFIG, $interface, $ip);
-push(@ifconfig, 'netmask', $netmask) if $netmask;
-
-system(@ifconfig);
-die join(" ", @ifconfig) . " failed: $!\n" if $?;
-
-# Add the host route, if needed
-if ($router) {
-    if ($routedest ) {
-	my @cmd;
-
-	if ( $os =~ /^Linux/ ) { 
-	    @cmd = ($ROUTE, 'add', $routedest, 'gw', $router);
-	}
-	elsif ( $os =~ /^FreeBSD/ ) {
-	    @cmd = ($ROUTE, 'add', $routedest, $router);
-	}
-	else {
-	    die "Unknown OS: $os\n";
-	}
-	system(@cmd);
-	die join(" ", @cmd) . " failed: $?\n" if $?;
-    }
-}
-else { warn "Destination but no router\n" if $routedest; }
-if ($recordfile) {
-    $netmask = "255.255.255.0" unless $netmask;
-    my $rf = new IO::File(">>$recordfile") || 
-	die "Can't open $recordfile:$!\n";
-    print $rf "$ip:$interface:$mac:$netmask\n";
-    $rf->close();
-}
-exit(0);
Index: fedkit/convert_testbeds_file.pl
===================================================================
--- fedkit/convert_testbeds_file.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#!/usr/bin/perl
-
-use IO::File;
-
-# Read a hash of per-testbed parameters from the local configurations.
-$conf = new IO::File(shift) || 
-    die "can't read testbed configutions from $tb_config: $!\n";
-while (<$conf>) {
-    next if /^#/;
-    chomp;
-    ($tb, $h, $d, $u, $p, $es, $gs, $mes, $mgs, $t, $i, $fs, $boss, $tun) = 
-	split(":", $_);
-
-    # Make sure the domain starts with a period
-    $d = ".$d" unless $d =~ /^\./;
-
-    print <<END;
-[$tb]
-OpsNode: $h
-User: $u
-Domain: $d
-Project: $p
-ConnectorType: $t
-ConnectorImage: $i
-SlaveNodeStartCmd: $es
-SlaveConnectorStartCmd: $gs
-MasterNodeStartCmd: $mes
-MasterConnectorStartCmd: $mgs
-FileServer: $fs
-Boss: $boss
-TunnelCfg: $tun
-
-END
-}
-$conf->close();
Index: fedkit/fed-tun.pl
===================================================================
--- fedkit/fed-tun.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,488 +1,0 @@
-#!/usr/bin/perl -w
-
-# Kevin Lahey, lahey@isi.edu
-# July 11, 2007
-
-# Set up ssh tunnel infrastructure for federation:
-# 
-# * Parse the configuration file provided.
-#
-# * Figure out whether we're the initiator or the reciever;  if we're 
-#   the receiver, we just need to set up ssh keys and exit.
-#
-# * Pick out the experimental interface, remove the IP address
-# 
-# * Create a layer 2 ssh tunnel, set up bridging, and hang loose.
-#
-
-use strict;
-use Getopt::Std;
-use POSIX qw(strftime);
-use Sys::Hostname;
-use IO::File;
-use File::Copy;
-
-my $IFCONFIG = "/sbin/ifconfig";
-my $TMCC = "/usr/local/etc/emulab/tmcc";
-my $FINDIF = "/usr/local/etc/emulab/findif";
-# If a special version of ssh is required, it will be installed in
-# /usr/local/bin/ssh.  Otherwise use the usual one.
-my $SSH = -x "/usr/local/bin/ssh" ? "/usr/local/bin/ssh" : "/usr/bin/ssh";
-my $NC = "/usr/bin/nc";
-my $SSH_PORT = 22;
-my $ROUTE_GET = "/sbin/route get";  # XXX:  works on FreeBSD, but should
-				    #       should be 'ip route get' for Linux
-my $sshd_config = "/etc/ssh/sshd_config";    # Probably should be a param
-
-# Ports that are forwarded between testbeds
-my $TMCD_PORT = 7777;
-my $SMBFS_PORT = 139;
-my $PUBSUB_PORT = 16505;
-my $SEER_PORT = 16606;
-
-
-my $remote_pubsub_port = $PUBSUB_PORT - 1;  # There will be a local
-					    # pubsubd running, so we
-					    # dodge the port on the
-					    # remote tunnel node.
-die "Cannot exec $SSH" unless -x $SSH;
-
-sub setup_bridging;
-sub setup_tunnel_cfg;
-sub parse_config;
-
-# Option use is as follows:
-#    -f         filename containing config file
-#    -d         turn on debugging output
-#    -r		remotely invoked
-#               (if remotely invoked the last two args are the tun interface
-#               number and the remote address of the tunnel)
-
-my $usage = "Usage: fed-tun.pl [-r] [-d] [-f config-filename] [count addr]\n";
-
-my %opts;	# Note that this is used for both getops and the options file
-my @expected_opts = qw(active tunnelcfg bossname fsname type 
-		       peer pubkeys privkeys);
-my $filename;
-my $remote;
-my $debug = 1;
-my $count;
-my $addr;
-my $active;
-my $type;
-my $tunnelcfg;
-my @ssh_port_fwds;		# Queue of ssh portforwarders to start.  The
-				# -L or -R is in here.
-my $remote_script_dir;		# location of the other sides fed-tun.pl
-my $event_repeater;		# The pathname of the event repeater
-
-if ($#ARGV != 0 && !getopts('df:rn', \%opts)) {
-    die "$usage";
-}
-
-if (defined($opts{'d'})) {
-    $debug = 1;
-}
-
-if (defined($opts{'f'})) {
-    $filename = $opts{'f'};
-}
-else {
-    # Find the configuration file in the usual place, which depends on what
-    # experiment and project we're in.
-    my $pid;
-    my $eid;
-
-    open(TMCD, "$TMCC status |") || die "tmcc failed\n";
-    print "Opened $TMCC status\n" if ($debug);
-    while (<TMCD>) {
-	chomp;
-	/ALLOCATED=([^\/]+)\/(\S+)/ && do {
-	    $pid = $1;
-	    $eid = $2;
-	};
-    }
-    close(TMCD);
-    my $hn = `hostname`;
-    chomp $hn;
-    $filename = "/proj/$pid/exp/$eid/tmp/$hn.gw.conf"
-	if $pid and $eid;
-}
-
-if (defined($opts{'r'})) {
-    $remote = 1;
-    die "$usage" if ($#ARGV != 1);
-    
-    $count = pop @ARGV;
-    $addr = pop @ARGV;
-}
-
-die "$usage" if (!defined($remote) && !defined($filename));
-
-if (defined($filename)) {
-    &parse_config("$filename", \%opts) || 
-	die "Cannot read config file $filename: $!\n";
-
-    foreach my $opt (@expected_opts) {
-	warn "Missing $opt option\n" if (!defined($opts{$opt}));
-    }
-
-    $active = 1 if ($opts{'active'} =~ /true/i);
-    $tunnelcfg = 1 if ($opts{'tunnelcfg'} =~ /true/i);
-    $type = $opts{'type'};
-    $type =~ tr/A-Z/a-z/;
-    $remote_script_dir = $opts{'remotescriptdir'} || ".";
-    $event_repeater = $opts{'eventrepeater'};
-    my $listen_on = $opts{'sshlisten'}||"";
-
-    if (defined($opts{'fsname'})) {
-	push(@ssh_port_fwds,"-R $listen_on:$SMBFS_PORT:$opts{'fsname'}:$SMBFS_PORT");
-    }
-
-    if (defined($opts{'bossname'})) {
-	push(@ssh_port_fwds, "-R $listen_on:$TMCD_PORT:$opts{'bossname'}:$TMCD_PORT");
-    }
-
-    if (defined($opts{'eventservername'})) {
-	push(@ssh_port_fwds,"-R ". 
-	    "$listen_on:$remote_pubsub_port:$opts{'eventservername'}:$PUBSUB_PORT");
-    }
-    if (defined($opts{'remoteeventservername'})) {
-	push(@ssh_port_fwds,"-L :$remote_pubsub_port:" . 
-	    "$opts{'remoteeventservername'}:$PUBSUB_PORT");
-    }
-
-    # Forward connections to seer from remote TBs to control in this TB
-    if (defined($opts{'seercontrol'})) {
-	push(@ssh_port_fwds,"-R $listen_on:$SEER_PORT:$opts{seercontrol}:$SEER_PORT");
-    }
-
-    # -n just starts the ssh tap tunnel
-    @ssh_port_fwds = () if ($opts{'type'} eq 'experiment' || $opts{'n'});
-
-    print "ssh_port_fwds = ", join("\n",@ssh_port_fwds), "\n" if ($debug);
-}
-
-# Both sides need to have GatewayPorts and PermitTunnel set.  Copy the existing
-# sshd_config, making sure GatewayPorts and PermitTunnel are set to yes,
-# replace the original, and restart sshd.
-my $ports_on = 0;
-my $tunnel_on = 0;
-
-my $conf = new IO::File($sshd_config) || die "Can't open $sshd_config: $!\n";
-my $new_conf = new IO::File(">/tmp/sshd_config") || 
-    die "Can't open new ssh_config: $!\n";
-
-while(<$conf>) {
-    s/^\s*GatewayPorts.*/GatewayPorts yes/ && do {
-	print $new_conf $_ unless $ports_on++;
-	next;
-    };
-    s/^\s*PermitTunnel.*/PermitTunnel yes/ && do {
-	print $new_conf $_ unless $tunnel_on++;
-	next;
-    };
-    print $new_conf $_;
-}
-print $new_conf "GatewayPorts yes\n" unless $ports_on;
-print $new_conf "PermitTunnel yes\n" unless $tunnel_on;
-$conf->close();
-$new_conf->close();
-
-copy("/tmp/sshd_config", $sshd_config) || 
-    die "Cannot replace $sshd_config: $!\n";
-
-system("/etc/rc.d/sshd restart");
-
-# Need these to make the Ethernet tap and bridge to work...
-system("kldload /boot/kernel/bridgestp.ko") 
-    if -r "/boot/kernel/bridgestp.ko";
-system("kldload /boot/kernel/if_bridge.ko");
-system("kldload /boot/kernel/if_tap.ko");
-
-if ($tunnelcfg && !$remote) {
-    # Most Emulab-like testbeds use globally-routable addresses on the
-    # control net;  at DETER, we isolate the control net from the Internet.
-    # On DETER-like testbeds, we need to create special tunneling nodes
-    # with external access.  Set up the external addresses as necessary.
-    &setup_tunnel_cfg(%opts);
-}
-
-if (!$remote) {
-    system("umask 077 && cp $opts{'privkeys'} /root/.ssh/id_rsa");
-    system("umask 077 && cp $opts{'pubkeys'} /root/.ssh/id_rsa.pub");
-    system("umask 077 && cat $opts{'pubkeys'} >> /root/.ssh/authorized_keys");
-}
-
-if ($active) {
-    # If we're the initiator, open up a separate tunnel to the remote 
-    # host for each of the different experiment net interfaces on this 
-    # machine.  Execute this startup script on the far end, but with 
-    # the -r option to indicate that it's getting invoked remotely and 
-    # we should just handle the remote-end tasks.
-
-    # Set up synchronization, so that the various user machines won't try to
-    # contact boss before the tunnels are set up.  (Thanks jjh!)
-
-    do {
-	system("$NC -z $opts{'peer'} $SSH_PORT");
-    } until (!$?);
-
-    # XXX:  Do we need to clear out previously created bridge interfaces?
-
-    my $count = 0;
-    my @SSHCMD;
-
-    # If we are just setting up a control net connection, just fire up
-    # ssh with the null command, and hang loose.
-
-    if ($type eq "control") {
-	foreach my $fwd (@ssh_port_fwds) {
-	    system("$SSH -N $fwd -o \"StrictHostKeyChecking no\" ". 
-		"$opts{'peer'} &"); #or die "Failed to run ssh";
-	}
-
-	exit;
-    }
-
-    open(IFFILE, "/var/emulab/boot/ifmap") || die "couldn't open ifmap\n";
-    while (<IFFILE>) {
-	my @a = split(' ');
-	my $iface = $a[0];
-	my $addr = $a[1];
-	my $bridge = "bridge" . $count;
-	my $tun = "tap" . $count;
-	my $cmd;
-
-	print "Found $iface, $addr, to bridge on $bridge\n" if ($debug);
-
-	# Note that we're going to fire off an ssh which will never return;
-	# we need the connection to stay up to keep the tunnel up.
-	# In order to check for problems, we open it this way and read
-	# the expected single line of output when the tunnel is connected.
-	# To make debugging easier and to degrade more gracefully, I've split
-	# these out into multiple processes.
-	
-	foreach my $fwd (@ssh_port_fwds) {
-	    $cmd = "$SSH -N $fwd -o \"StrictHostKeyChecking no\" ". 
-		"$opts{'peer'} &";
-
-	    print "$cmd\n" if $debug;
-	    system("$cmd"); # or die "Failed to run ssh";
-	}
-	# The Tunnel option specifies the level to tunnel at.  Ethernet creates
-	# a tap device rather than a tun device.  Strict host key checking
-	# avoids asking the user to OK a strange host key.
-	#
-	# Important safety tip:  ssh v 6.5 and above have a parsing bug
-	# that means if you put -w before the -o "Tunnel ethernet"
-	# parameter, you get a layer 3 tunnel instead of a layer 2 tunnel.
-	# Don't move args in this line capricously.
-	$cmd =  "$SSH -o \"Tunnel ethernet\" -w $count:$count " .
-	    "-o \"StrictHostKeyChecking no\" " . 
-	    "$opts{'peer'}  \"$remote_script_dir/fed-tun.pl " . 
-	    "-r $addr $count\" & |";
-
-	print "$cmd\n" if $debug;
-
-	open(SSHCMD, $cmd) 
-	   or die "Failed to run ssh";
-	# Wait for the other end to report its work done.  This string comes
-	# from the block below (after the elsif) -- tvf
-	my $check;  # Make sure something ran...
-
-	while ($check = <SSHCMD>) {
-	    last if $check =~ /^Remote connection all/;
-	}
-	print "Got line [$check] from remote side\n" if ($debug);
-
-	&setup_bridging($tun, $bridge, $iface, $addr);
-	$count++;
-	@ssh_port_fwds = ();  # only do this on the first connection
-    }
-    close(IFFILE);
-
-    # Start a local event repeater (unless we're missing parameters 
-    die "Missing event repeater params (No config file ?)\n"
-	unless $event_repeater && $opts{'remoteexperiment'} && 
-	$opts{'localexperiment'};
-
-    print "Starting event repeater\n" if $debug;
-    
-    print("$event_repeater -M -P $remote_pubsub_port -S localhost " . 
-	"-E $opts{'remoteexperiment'} -e $opts{'localexperiment'}\n") 
-	if $debug;
-    # Connect to the forwarded pubsub port on this host to listen to the
-    # other experiment's events, and to the local experiment to forward
-    # events.
-    system("$event_repeater -M -P $remote_pubsub_port -S localhost " . 
-	"-E $opts{'remoteexperiment'} -e $opts{'localexperiment'}");
-    warn "Event repeater returned $?\n" if $?;
-} elsif ($remote) {
-    # We're on the remote system;  figure out which interface to 
-    # tweak, based on the IP address passed in.
-
-    my $iter = 0;
-    my $iface;
-
-    open(RTFILE, "$ROUTE_GET $addr |") || die "couldn't do $ROUTE_GET\n";
-    while (<RTFILE>) {
-        if (/interface: (\w+)/) {
-	    $iface = $1;
-	}
-    }
-    close(RTFILE);
-
-    die "Couldn't find interface to use." if (!defined($iface));
-    my $bridge = "bridge" . $count;
-    my $tun = "tap" . $count;
-
-    &setup_bridging($tun, $bridge, $iface, $addr);
-    print "Remote connection all set up!\n";  # Trigger other end with output
-
-    # If this is the first remote invocation on a control gateway, start the
-    # event repeater.
-
-    if ( $count == 0 && $type ne "experiment" ) {
-	my $remote_pubsub_port = $PUBSUB_PORT - 1;  # There will be a local
-						    # pubsubd running, so we
-						    # dodge the port on the
-						    # remote tunnel node.
-	# Make sure we have the relevant parameters
-	die "Missing event repeater params (No config file ?)\n"
-	    unless $event_repeater && $opts{'remoteexperiment'} && 
-	    $opts{'localexperiment'};
-
-	print "Starting event repeater\n" if $debug;
-	
-	# Connect to the forwarded pubsub port on this host to listen to the
-	# other experiment's events, and to the local experiment to forward
-	# events.
-	system("$event_repeater -P $remote_pubsub_port -S localhost " . 
-	    "-E $opts{'remoteexperiment'} -e $opts{'localexperiment'}");
-	warn "Event repeater returned $?\n" if $?;
-    }
-} else {
-    print "inactive end of a connection, finishing" if ($debug);
-}
-
-print "all done!\n" if ($debug);
-exit;
-
-
-# Set up the bridging for the new stuff...
-
-sub setup_bridging($; $; $; $) {
-    my ($tun, $bridge, $iface, $addr) = @_;
-
-    print "Waiting to see if new iface $tun is up\n" if ($debug);
-
-    do {
-	sleep 1;
-	system("$IFCONFIG $tun");
-    } until (!$?);
-
-    print "setting up $bridge with $iface and nuking $addr\n" if ($debug);
-
-    system("ifconfig $bridge create");
-    system("ifconfig $iface delete $addr");
-    system("ifconfig $bridge addm $iface up");
-    system("ifconfig $bridge addm $tun");
-}
-
-# Set up tunnel info for DETER-like testbeds.
-
-sub setup_tunnel_cfg {
-    my (%opts) = @_;
-    #my $tunnel_iface = "em0";   # XXX
-    my $tunnel_iface = $opts{'interface'} || "em0";
-    my $tunnel_ip;
-    my $tunnel_mask;
-    my $tunnel_mac;
-    my $tunnel_router;
-
-    print "Opening $TMCC tunnelip\n" if ($debug);
-
-    open(TMCD, "$TMCC tunnelip |") || die "tmcc failed\n";
-    print "Opened $TMCC tunnelip\n" if ($debug);
-    while (<TMCD>) {
-        print "got one line from tmcc\n" if ($debug);
-	print if ($debug);
-	if (/^TUNNELIP=([0-9.]*) TUNNELMASK=([0-9.]*) TUNNELMAC=(\w*) TUNNELROUTER=([0-9.]*)$/) {
-	    $tunnel_ip = $1;
-	    $tunnel_mask = $2;
-	    $tunnel_mac = $3;
-	    $tunnel_router = $4;
-	}
-    }
-    close(TMCD);
-
-    print "tunnel options:  ip=$tunnel_ip mask=$tunnel_mask mac=$tunnel_mac router=$tunnel_router\n" if ($debug);
-
-    if (defined($tunnel_mac) && ($tunnel_mac ne "")) {
-       print "Opening $FINDIF $tunnel_mac\n" if ($debug);
-       open(FIF, "$FINDIF $tunnel_mac |") || die "findif failed\n";
-       my $line = <FIF>;
-       chomp($line);
-       print "$FINDIF returned $line\n" if ($debug);
-       $tunnel_iface = $line;
-    }
-
-    system("ifconfig $tunnel_iface $tunnel_ip" .
-	   ($tunnel_mask ? " netmask $tunnel_mask" : "") . " up");
-    warn "configuration of tunnel interface failed" if ($?);
-
-    if ($tunnel_router) {
-
-	# Sometimes the insertion of DNS names lags a bit.  Retry this
-	# configuration a few times to let DNS catch up.  Might want to really
-	# check the DNS name before we try this...
-	my $config_succeeded = 0;
-	my $tries = 0;
-	my $max_retries = 300;
-
-	do {
-	    system("route add $opts{'peer'} $tunnel_router");
-	    if ( $? ) {
-		warn "configuration routes via tunnel interface failed";
-		$tries++;
-		sleep(10);
-	    }
-	    else { $config_succeeded = 1; }
-	} until ( $config_succeeded || $tries > $max_retries );
-    }
-
-    print "setup_tunnel_cfg done\n" if ($debug);
-}
-
-# Trick config-file parsing code from Ted Faber:
-
-# Parse the config file.  The format is a colon-separated parameter name
-# followed by the value of that parameter to the end of the line.  This parses
-# that format and puts the parameters into the referenced hash.  Parameter
-# names are mapped to lower case, parameter values are unchanged.  Returns 0 on
-# failure (e.g. file open) and 1 on success.
-sub parse_config {
-    my($file, $href) = @_;
-    my($fh) = new IO::File($file);
-	
-    unless ($fh) {
-	warn "Can't open $file: $!\n";
-	return 0;
-    }
-
-    while (<$fh>) {
-	next if /^\s*#/ || /^\s*$/;	# Skip comments & blanks
-	chomp;
-	/^([^:]+):\s*(.*)/ && do {
-	    my($key) = $1; 
-
-	    $key =~ tr/A-Z/a-z/;
-	    $href->{$key} = $2;
-	    next;
-	};
-	warn "Unparasble line in $file: $_\n";
-    }
-    $fh->close();   # It will close when it goes out of scope, but...
-    return 1;
-}
Index: fedkit/fed_bootstrap
===================================================================
--- fedkit/fed_bootstrap	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#!/bin/sh
-
-# Bootstrap cleint federation set up.  Move federation scripts to /tmp and
-# execute them from there.  Because those scripts unmount significant hunks of
-# the file system - including the directories in which the scripts are
-# initially stored - unpredictable behavior can result unless we're careful not
-# to be depending on any of those directories.
-
-# Emulab scripts directory
-EMUDIR="/usr/local/etc/emulab/"
-
-# Find this experiment's stashed scripts.  (Perl for advanced parsing)
-SCRIPTDIR=`$EMUDIR/tmcc -b status | perl -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "/proj/$1/exp/$2/tmp\n";'`
-
-
-# Die if federation scripts are not where they're supposed to be.
-if [ -z "$SCRIPTDIR" ] ; then
-    echo "Can't find federation scripts.  Tmcc status says:"
-    $EMUDIR/tmcc -b status
-    exit 1;
-fi
-
-# The copy
-for f in federate.sh smbmount*.pl *.patch; do 
-	cp $SCRIPTDIR/$f /tmp && chmod 755 /tmp/$f
-done
-
-# Move to a safe directory and overwrite this process with the actual
-# federation script, and run it.
-cd /tmp
-exec /tmp/federate.sh "$1" "$2"
Index: fedkit/federate.pl
===================================================================
--- fedkit/federate.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,267 +1,0 @@
-#! /usr/bin/perl
-
-
-use strict;
-
-use Getopt::Long;
-
-use IO::File;
-use IO::Pipe;
-use File::Copy;
-
-use Net::hostent;
-use Socket;
-
-use gateway_lib;
-
-# rc.fedaccounts is going to send a TERM to any processes running as an old
-# user, so insulate this (and children) process from propagated signals.
-$SIG{'TERM'} = 'IGNORE';
-
-chdir("/tmp");
-
-my $TMCC = "/usr/local/etc/emulab/tmcc";
-my $RC_ROUTE = "/usr/local/etc/emulab/rc/rc.route";
-my $tmcc_p = new IO::Pipe() || die "Can't open pipe: $!\n";
-my $shared_config_dir;
-my $shared_seer_auth_dir;
-my $local_config_dir = "/usr/local/federation/etc";
-my %services;
-my %aliases;
-my %added;
-my @hide;
-my $perl;
-
-my $gateway;
-my $smbshare = "USERS";
-my $smbuser;
-my $smbproject;
-my $exp;
-my $proj;
-my $install_smb;
-my $smb_type = 'cifs';
-chomp (my $uname = `uname`);
-my $smbmount = "smbmount.$uname.pl";
-
-GetOptions("install_samba" => \$install_smb);
-
-# find perl
-for my $p ("/usr/bin/perl", "/usr/local/bin/perl") {
-    if ( -x $p ) {
-	$perl = $p;
-	last;
-    }
-}
-$perl = "perl" unless $perl;
-
-if (!-x '/sbin/mount.cifs' ) {
-    if ( -x '/usr/bin/yum' ) {
-	# Install samba
-	system('/usr/bin/yum -y install samba-client');
-	system('/usr/bin/yum -y install cifs-utils');
-	# These tools expect the fstab to include cifs
-	$smb_type = 'cifs';
-    }
-    elsif (-x '/usr/bin/apt-get') {
-	# Install samba
-	system('/usr/bin/apt-get -y update');
-	system('/usr/bin/apt-get -y install samba-client');
-	system('/usr/bin/apt-get -y install smbfs');
-	# These tools expect the fstab to include cifs
-	$smb_type = 'cifs';
-    }
-}
-
-if (!-e "$local_config_dir/client.conf" ) {
-    $tmcc_p->reader("$TMCC -b status");
-    while (<$tmcc_p>) {
-	/ALLOCATED=([^\/]+)\/(\S+)/ && do {
-	    ($proj, $exp) = ($1, $2);
-	    $shared_config_dir = "/proj/$proj/exp/$exp/tmp";
-	    $shared_seer_auth_dir = "/proj/$proj/exp/$exp/tbdata";
-	    last;
-	};
-    }
-    $tmcc_p->close();
-
-    mkdir($local_config_dir);
-
-    foreach my $fn ("seer.conf", "client.conf", "userconf", "hosts",
-	    "ca.pem", "node.pem", "route.tgz") {
-	copy("$shared_config_dir/$fn", $local_config_dir )
-	    if -e "$shared_config_dir/$fn";
-    }
-    # If there are static routes, unpack them
-    system("tar -C $local_config_dir -xzf $local_config_dir/route.tgz")
-	if -e "$local_config_dir/route.tgz";
-
-    # Copy seer authorization files into the location that standard SEER
-    # invocations will look.  The above loop puts them where -F invocations
-    # will look.
-    foreach my $fn ("ca.pem", "node.pem") {
-	copy("$shared_config_dir/$fn", $shared_seer_auth_dir )
-	    if -e "$shared_config_dir/$fn" && -d $shared_seer_auth_dir;
-    }
-}
-
-my $client = new IO::File("$local_config_dir/client.conf");
-while (<$client>) {
-    chomp;
-    /ControlGateway:\s+(.*)/i && do { $gateway = $1; };
-    /SMBShare:\s+(.*)/i && do { $smbshare = $1; };
-    /ProjectUser:\s+(.*)/i && do { $smbuser = $1; };
-    /ProjectName:\s+(.*)/i && do { $smbproject = $1; };
-    /Service:\s+(.*)/i && do { $services{$1}++;};
-    /PortalAlias:\s+(.*)/i && do { $aliases{$1}++;};
-    /AddedNode:\s+(.*)/i && do { $added{$1}++; };
-    /Hide:\s+(.*)/i && do { push(@hide, split(",", $1));};
-}
-$client->close();
-# Create the /etc/hosts file
-my $hosts = new IO::File("/etc/hosts") || die "Can't open /etc/hosts:$!\n";
-my $new_hosts = new IO::File(">/tmp/hosts") || die "Can't open /tmp/hosts:$!\n";
-my $config_hosts = new IO::File("$local_config_dir/hosts") || 
-    die "Can't open $local_config_dir/hosts: $!\n";
-my $has_control = 0;
-
-while (<$hosts>) {
-    /^127\.0\.0\.1/ && do { print $new_hosts $_; };
-    # If aliases conflict with existing nodes, delete the alias
-    for my $n (split($_)) {
-	chomp $n;
-	delete $aliases{$n} if $aliases{$n};
-    }
-}
-$hosts->close();
-HOST:
-while (<$config_hosts>) {
-    # Trim out hosts that were hidden by their home testbeds
-    for my $h (@hide) {
-	next HOST if /^\d+\.\d+\.\d+\.\d+\s+$h-/;
-    }
-    print $new_hosts $_;
-}
-print $new_hosts "\n";
-$config_hosts->close();
-
-# Add gateway aliases
-for my $k (keys %aliases) {
-    # If we added a node, it's a node without a local address.  Bind the name
-    # to the IP in /etc/hosts.  If we didn't add a node, it's the gateway node.
-    (my $lname = $gateway) =~ s/^[^\.]+/$k/;
-    my $ip = gateway_lib::get_ip($added{$k} ? $lname : $gateway);
-    if ($ip) { 
-	# We have an IP.  Make a hosts entry for the key and the key plus the
-	# first two subdomains (which is an emulab setup)
-	my @x = split(/\./, $lname);
-	if (@x > 3 ) { splice(@x, 3); }
-	my $out = join(".", @x);
-	print $new_hosts "$ip\t$out $k\n";
-    }
-    else { print $new_hosts "# Can't get ip for $lname\n"; }
-}
-$new_hosts->close();
-copy("/tmp/hosts", "/etc/hosts");
-
-
-# If there are tunnelip interfaces to bring up, bring 'em up.  Record any such
-# interfaces in /usr/local/federation/interfaces, so SEER can find them later.
-system("$perl -I/usr/local/federation/lib " . 
-    "/usr/local/federation/bin/config_from_tunnelip.pl " . 
-    "--record=/usr/local/federation/etc/interfaces");
-
-if ($uname =~ /Linux/ ) {
-    system("$perl /usr/local/federation/bin/static_routing.pl")
-	if -r "/usr/local/federation/bin/static_routing.pl";
-    if ($?) {
-	system("$perl /usr/local/federation/bin/gated_routing.pl")
-	    if -r "/usr/local/federation/bin/gated_routing.pl";
-	}
-    if ($?) {
-	system("$perl /usr/local/federation/bin/quagga_routing.pl")
-	    if -r "/usr/local/federation/bin/quagga_routing.pl";
-    }
-}
-elsif ($uname =~/FreeBSD/ ) {
-    system("$perl /usr/local/federation/bin/static_routing.pl")
-	if -r "/usr/local/federation/bin/static_routing.pl";
-    if ($?) {
-	# FreeBSD needs to have ospfs installed and a router config created and
-	# run.
-	system("$perl /usr/local/federation/bin/ospf_routing.pl")
-	    if -r "/usr/local/federation/bin/ospf_routing.pl";
-    }
-}
-
-
-if ($services{'userconfig'}) {
-    if (!-e "$local_config_dir/old_accts") {
-	$tmcc_p = new IO::Pipe() || die "Can't open pipe for accounts:$!\n";
-	my $old_accounts = new IO::File(">$local_config_dir/old_accts") || 
-	    die "Can't open $local_config_dir/old_accts: $!\n";
-
-	$tmcc_p->reader("$TMCC -b accounts");
-	while (<$tmcc_p>) {
-	    print $old_accounts $_;
-	}
-	$tmcc_p->close();
-	$old_accounts->close();
-    }
-    print("Updating accounts");
-    system("/usr/local/federation/bin/rc.fedaccounts");
-}
-
-if ($services{'SMB'}) {
-    if ($uname =~ /FreeBSD/ ) {
-	system("umount -A -f -t nfs,smbfs,cifs");
-	$smb_type = "smbfs";
-    }
-    elsif ($uname =~ /Linux/ ) {
-	# Pass individual filestems to Linux umount.  No -A.
-	my $mtab = new IO::File("/etc/mtab") || die "Can't open /etc/mtab:$!\n";
-	while (<$mtab>) {
-	    chomp;
-	    my @F = split($_);
-	    next unless $F[2] =~ /(nfs|cifs|smbfs)/;
-	    system("umount -f $F[1]");
-	}
-    }
-
-    print "Waiting for SMB server\n";
-    gateway_lib::wait_for_port($gateway, 139, 60*60) || 
-	die "SMB server never came up\n";
-    print "Mounting via SMB\n";
-    system("$perl /usr/local/federation/bin/$smbmount $smbshare $gateway " . 
-	"$smbuser $smbproject $smb_type");
-}
-
-if ($uname =~ /FreeBSD/ ) {
-    # Restart ntp
-    system("/etc/rc.d/ntpd stop; /usr/sbin/ntpdate boss; " . 
-	"/etc/rc.d/ntpd start;");
-					       
-}
-elsif ($uname =~ /Linux/ ) {
-    # restart ntp
-    if (-d "/etc/rc.d/init.d" ) {
-	system("/etc/rc.d/init.d/ntpd stop; /usr/sbin/ntpdate boss; ". 
-	    "/etc/rc.d/init.d/ntpd start");
-    } elsif (-d "/etc/init.d" ) {
-	system("service ntp stop; /usr/sbin/ntpdate boss; ". 
-	    "service ntp start");
-    }
-    else {
-	print "Cannot find ntp directories\n";
-    }
-}
-
-# startcmd
-if ($ARGV[0] && $ARGV[1]) {
-    if ($uname =~ /FreeBSD/) {
-	system("su -l \"$ARGV[0]\" -c \"$ARGV[1]\"");
-    }
-    elsif ($uname =~ /Linux/) {
-	system("su \"$ARGV[0]\" --command \"$ARGV[1]\"");
-    }
-}
-exit(0);
Index: fedkit/federate.sh
===================================================================
--- fedkit/federate.sh	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,242 +1,0 @@
-#!/bin/sh
-
-# Set up a federated environment on a client.  Unmount all local file systems,
-# erase all local accounts and then bring in accounts and file systems from the
-# master testbed.  Once all that's done, restore client communication to the
-# local bossnode and execute any startup command passed in as arguments to this
-# script.
-
-
-# The file containing the DNS name of the current boss
-BOSSNODE="/usr/local/etc/emulab/bossnode"
-
-# Ports that the master gateway will forward
-PORTS="139 7777"
-# network cat command (to listen for the gateway)
-NC="/usr/bin/nc"
-# Emulab rc scripts directory
-RCDIR="/usr/local/etc/emulab/rc"
-
-# Emulab rc script to reset accounts and federation srcipt to start the smb
-# automount process.
-RCACCT="rc.accounts"
-SMBMOUNT="smbmount.`uname`.pl"
-
-# Find the right version of pkill.  For killing.
-if [ -x "/usr/bin/pkill" ] ; then 
-	PKILL="/usr/bin/pkill"
-else
-	if [ -x "/bin/pkill" ] ; then 
-		PKILL="/bin/pkill"
-	else
-		PKILL="echo"
-	fi
-fi
-
-if [ -x "/usr/bin/perl" ]; then
-    PERL="/usr/bin/perl"
-else
-    if [ -x "/usr/local/bin/perl" ]; then
-	PERL="/usr/local/bin/perl"
-    else
-	# Wing it...
-	PERL="perl"
-    fi
-fi
-
-# Find somewhere safe to stop
-cd /tmp
-
-if [ -f $BOSSNODE ]
-then
-	rm -f $BOSSNODE
-fi
-
-EMUDIR="/usr/local/etc/emulab/"
-
-# Find this experiment's stashed scripts.  (Perl for advanced parsing)
-PROJECT=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$1\n";'`
-EXP=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$2\n";'`
-CONFIGDIR="/proj/$PROJECT/exp/$EXP/tmp"
-SCRIPTDIR="/usr/local/federation/bin"
-
-# Die if Scripts are not where they should be.  NB, this is checked by the
-# bootstrapper, too, so a failure here is unlikely.
-if [ -z "$CONFIGDIR" ] ; then
-    echo "Can't find federation configs.  Tmcc status says:"
-    $EMUDIR/tmcc -b status
-    exit 1;
-fi
-
-# Leave the client configuration information where clients can use it
-mkdir -p "/usr/local/federation/etc"
-cp "$CONFIGDIR/client.conf" "/usr/local/federation/etc"
-chmod 644 "/usr/local/federation/etc/client.conf"
-# Capture accounts to remove for rc.fedaccounts
-$EMUDIR/tmcc -b accounts > /usr/local/federation/etc/old_accts
-chmod 644 "/usr/local/federation/etc/old_accts"
-
-# Get our gateway, share, and mount user from the configuration file.
-# There's probably a way to get all three at once, but this works.
-GATEWAY=`$PERL -ne '/ControlGateway:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf`
-SHARE=`$PERL -ne '/SMBShare:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf`
-SMBUSER=`$PERL -ne '/ProjectUser:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf`
-SMBPROJECT=`$PERL -ne '/ProjectName:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf`
-
-# If this is empty confusion reigns.  Set a default.
-if [ -z "$SHARE" ]; then
-	SHARE="USERS"
-fi
-
-# XXX: modified seer daemon to read a config file.  Not in the tarfile yet.  If
-# we see one, and there's a /usr/seer/backend/daemon.py, replace that one with
-# the local one.
-if [ -e /usr/seer/backend/daemon.py ] && [ -e $SCRIPTDIR/daemon.py ]; then
-	/bin/cp $SCRIPTDIR/daemon.py /usr/seer/backend/daemon.py 
-fi
-
-if [ -e /usr/seer/backend/experiment-setup.py ] && [ -e $SCRIPTDIR/experiment-setup.py ]; then
-	/bin/cp $SCRIPTDIR/experiment-setup.py /usr/seer/backend/experiment-setup.py 
-fi
-
-# Copy the seer.conf to the local /tmp if there is one
-
-if [ -e $CONFIGDIR/seer.conf ]; then
-	/bin/cp $CONFIGDIR/seer.conf /tmp
-fi
-
-while [ -z "$GWIP" ]; do
-	GWIP=`host -N 10 $GATEWAY | $PERL -ne 's/.* has address // && print;'`
-	echo "GWIP is $GWIP"
-	sleep 10
-done
-# Copy the global hostnames file into /etc/hosts so this node can address
-# others in the experiment on other testbeds.  The extra steps preserves teh
-# localhost entry that's aliased to this host's name. 
-grep 127\\.0\\.0\\.1 /etc/hosts > /tmp/hosts
-cat "$CONFIGDIR/hosts" >> /tmp/hosts
-# If there's no node in this experiment called control, fake one so
-# that SEER events get through (if SEER's in use)
-if ! grep -q control $CONFIGDIR/hosts; then
-	echo "$GWIP	control.$EXP.$PROJECT" >> /tmp/hosts
-fi
-cp /tmp/hosts /etc/hosts && rm /tmp/hosts
-
-#
-# Spin on our gateway!
-#
-
-echo "Waiting for the tunnel to come online."
-
-for port in $PORTS
-do
-        until $NC -z $GATEWAY $port
-        do
-                sleep 5
-        done
-done
-
-#
-# Setup TMCC to use our gateway
-#
-
-echo "Configuring TMCC."
-echo $GATEWAY > $BOSSNODE
-
-# Capture new accounts  for rc.fedaccounts
-$EMUDIR/tmcc -b accounts > /usr/local/federation/etc/accts
-chmod 644 "/usr/local/federation/etc/accts"
-
-#
-# Unmount stuff before messing with accounts 
-#
-
-case `uname` in
-	"FreeBSD")
-		umount -A -f -t nfs,smbfs,cifs
-		;;
-	"Linux")
-		# Linux doesn't believe in -A so pull the filesystems out of
-		# /etc/mtab and umount them individually
-		for f in `$PERL -nae 'print "$F[1]\n" if $F[2] =~ /(nfs|cifs|smbfs)/;' /etc/mtab`; do
-			umount -f $f
-		done
-		;;
-esac
-
-#
-# Setup new accounts
-#
-
-# Clear the cache, just in case:
-rm -f /var/emulab/boot/tmcc/accounts
-
-/usr/local/federation/bin/rc.fedaccounts
-
-#
-# Call the smbmount perl script, this invokes the automounter to mount the
-# needed smb filesystems.
-#
-echo "Mounting via SMB."
-$PERL "/usr/local/federation/bin/$SMBMOUNT" $SHARE $GATEWAY $SMBUSER $SMBPROJECT
-
-echo "Restoring old bossnode"
-# remove bossnode override
-/bin/rm -f $BOSSNODE
-# Also clear any cached data that might interfere with rourte construction.
-/bin/rm -f /var/emulab/boot/tmcc/ifconfig
-
-# if threr are external IP addresses that need to be configured, bring them up.
-$PERL /usr/local/federation/bin/config_from_tunnelip.pl
-
-# I remain unclear why ospfd seems screwed up after the resetting of accounts
-# and mounts.  This seems to fix it, but it's not very satisfying.  At this
-# point the federated topology is complete, so any problems with routing in a
-# partial topology -e.g. failed or partial bridging - that might have confused
-# the router should be gone.
-$PKILL ospf
-$PKILL gated
-# XXX Danger, hack ahead.  Apparently our FC6-SMB image and emulab disagree
-# about where gated lives.  This will alias it.
-if [ ! -x /usr/sbin/gated ] ; then 
-	if [ -x /sbin/gated ] ; then
-		ln /sbin/gated /usr/sbin/gated
-	fi
-fi
-/usr/local/etc/emulab/rc/rc.route boot
-
-# And restore the ifconfig information because SEER wants it. (SEER pulls this
-# from tmcc now
-# "$EMUDIR/tmcc" ifconfig > /var/emulab/boot/tmcc/ifconfig
-
-# SEER feels pain and confusion if times are wrong.  This lays a big lick on
-# ntp sets the time directly and then restarts it.  XXX FreeBSD incantation is
-# untested.
-
-case `uname` in 
-	"FreeBSD")
-		/etc/rc.d/ntpd stop
-		/usr/sbin/ntpdate boss
-		/etc/rc.d/ntpd start
-		;;
-	"Linux")
-		/etc/rc.d/init.d/ntpd stop
-		/usr/sbin/ntpdate boss
-		/etc/rc.d/init.d/ntpd start
-		;;
-esac
-
-# Execute any command passed in as a startcmd.  This basically daisy chains the
-# startcmd.  This needs to become a perl script to have uniform behavior here.
-echo "*$1* *$2*"
-if [ ! -z "$1" ]; then 
-	echo "calling *$1* *$2*"
-	case `uname` in
-		"FreeBSD")
-			su -l "$1" -c "$2"
-			;;
-		"Linux")
-			su "$1" --command="$2"
-			;;
-	esac
-fi
Index: fedkit/gated_routing.pl
===================================================================
--- fedkit/gated_routing.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,61 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-use IO::File;
-use IO::Pipe;
-
-my $IFCONFIG = "/sbin/ifconfig";
-my @GATEDS= ("/usr/sbin/gated", "/sbin/gated" );
-my $GATED;
-
-my $fn = "/usr/local/federation/etc/gated.conf";
-my @live_ones;
-
-chomp (my $cif = `/usr/local/etc/emulab/control_interface`);
-
-my $ifp = new IO::Pipe();
-$ifp->reader("$IFCONFIG");
-while (<$ifp>) {
-    /^(eth\d+)/ && do {
-	push(@live_ones, $1) unless $1 eq $cif;
-    };
-}
-$ifp->close();
-
-foreach my $g (@GATEDS) {
-    if (-x $g ) {
-	$GATED = $g;
-	last;
-    }
-}
-
-die "Can't find gated in " . join(",", @GATEDS) . "\n" unless $GATED;
-
-my $f = new IO::File(">$fn") || die "Can't open $fn: $!\n";
-print $f <<END;
-smux off;
-rip off;
-ospf on {
-    backbone {
-END
-print $f "\tinterface $cif { passive; };\n";
-print $f <<END;
-    };
-    area 0.0.0.2 {
-	authtype none;
-END
-foreach my $i (@live_ones) {
-    print $f "\tinterface $i { priority 1; };\n";
-}
-print $f <<END;
-    };
-};
-END
-$f->close();
-
-$f = new IO::File(">/proc/sys/net/ipv4/ip_forward") || 
-    die "Can't open sys forwarding file:$!\n";
-print $f "1\n";
-$f->close();
-system("$GATED -f $fn");
-
Index: fedkit/gateway_lib.pm
===================================================================
--- fedkit/gateway_lib.pm	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,469 +1,0 @@
-#!/usr/bin/perl
-
-package gateway_lib;
-
-# Package stuff to keep the caller's namespace clean, but allow additions if
-# they need it.
-require Exporter;
-@ISA=qw(Exporter);
-@EXPORT_OK=qw(set_sshd_params import_key wait_for_DNS deter_tunnelip 
-    configure_outgoing_iface add_route bind_tap_to_iface iface_to_addr
-    dest_to_iface addr_to_iface read_config config_filename);
-
-
-use strict;
-
-use IO::File;
-use IO::Pipe;
-use IO::Socket;
-
-use File::Temp;
-use File::Copy;
-use Net::hostent;
-
-# Standard locations of these commands (FreeBSD)
-my $IFCONFIG = "/sbin/ifconfig";
-my $ROUTE = "/sbin/route";
-my $TMCC = "/usr/local/etc/emulab/tmcc";
-my $FINDIF = "/usr/local/etc/emulab/findif";
-my $TMCC = "/usr/local/etc/emulab/tmcc";
-
-# Linux choices
-my $BRCTL = "/usr/sbin/brctl";
-my $IPROUTE = "/sbin/ip route ";
-
-$BRCTL = '/sbin/brctl' unless -x $BRCTL ;
-
-# Takes an ssh config file and a reference to a hash of keys whose values must
-# be set a specific way.  Replaces existing entries with the set values.
-sub set_sshd_params {
-    my($keys, $file) = @_;
-    my $f;
-    my $t;
-
-    $file = "/etc/ssh/sshd_config" unless $file;
-    $f = new IO::File("$file") || die "Can't read $f: $!\n";
-    $t = new File::Temp() || die "Can't open tempfile: $!\n";
-
-    # If the parameter is in the file (even in a comment) update the line to
-    # have the new parameter.
-    my %updated;
-    while (<$f>) {
-	foreach my $k (keys %{$keys}) {
-	    if (s/^\s*#?\s*$k.*/$k $keys->{$k}/) { $updated{$k}++; }
-	}
-	print $t $_;
-    }
-    # Any parameters not found above are output directly.
-    foreach my $k (keys %{$keys}) {
-	print $t "$k " . $keys->{$k} . "\n" unless $updated{$k};
-    }
-    $f->close();
-    $t->close();
-    copy("$file", "$file.hold");
-    copy($t->filename, $file);
-    # When $t goes out of scope, the tmpfile is deleted
-}
-
-# Append the given keyfile to the given authorised key file.
-sub import_key {
-    my($keyfile, $authkeys) = @_;
-
-    my $kf = new IO::File($keyfile) || die "Can't open $keyfile:$!\n";
-    my $ak = new IO::File(">>$authkeys") || die "Can't open $authkeys: $!\n";
-
-    while (<$kf>) {
-	print $ak $_;
-    }
-    $kf->close();
-    $ak->close();
-}
-
-# Keep trying to look up the given hostname until successful.  If timeout is
-# given, die after waiting that long.  If sleep is given, wait that many
-# seconds between attempts (defaults to 5).  
-sub wait_for_DNS {
-    my($name, $timeout, $sleep) = @_;
-    my $start = time();
-    $sleep = 5 unless $sleep;
-    my $rv;
-
-    # If the name is an IP address, skip this.
-    return if $name =~ /^[\d\.]+$/;
-
-    while (!$rv) {
-	$rv = gethostbyname($name);
-	die "Timeout waiting for DNS to get $name\n" 
-	    if ($timeout && time() - $start > $timeout);
-	sleep($sleep) unless $rv;
-    }
-}
-
-# Get the external access parameters (interface, address, netmask, mac address,
-# and next hop router) from tmcd in Emulabs that support the DETER tunnelip
-# extension.
-sub deter_tunnelip {
-    # To parse tmcc
-    my $tmcc = new IO::Pipe || die "Can't create tmcc pipe: $!\n";
-    my $interface;		# Interface with external address
-    my $ip;			# IP address of external interface
-    my $mac;			# MAC address
-    my $netmask;		# Netmask
-    my $router;			# Router for the internet
-
-
-    # Parse out the info about tunnelips.  Format is usually one line of
-    # ATTR=VALUE.  Multiple lines are possible.
-    $tmcc->reader("$TMCC tunnelip");
-    while (<$tmcc>) {
-	chomp;
-	/TUNNELIP=([\d\.]*)/ && do { $ip = $1; };
-	/TUNNELMASK=([\d\.]*)/ && do { $netmask = $1; };
-	/TUNNELMAC=([[:xdigit:]]*)/ && do { $mac = $1; };
-	/TUNNELROUTER=([\d\.]*)/ && do { $router = $1; };
-    }
-    $tmcc->close();
-
-    die "No MAC information for tunnel.\n" unless $mac;
-
-    # Use the emulab findif command to get the right interface to configure
-    $interface = `$FINDIF $mac`;
-    chomp $interface;
-    die "Can't get interface for mac address $mac: $?" if $? || !$interface;
-
-    return ($interface, $ip, $netmask, $mac, $router);
-}
-
-
-# Configure the given interface with the given IP address and netmask.
-sub configure_outgoing_iface {
-    my ($interface, $ip, $netmask) = @_;
-
-    my @ifconfig = ($IFCONFIG, $interface, $ip);
-    push(@ifconfig, 'netmask', $netmask) if $netmask;
-
-    system(@ifconfig);
-    die join(" ", @ifconfig) . " failed: $!\n" if $?;
-}
-
-# Add a route to the destination through the router.  If wait is given, do not
-# attempt to add the route until DNS has the hostname in it.  If timeout is
-# given, only wait that many seconds for DNS to acquire it.
-sub add_route {
-    my($routedest, $router, $wait, $timeout) = @_;
-    my @cmd;
-    # Linux and FreeBSD use slightly different route syntax, so get the OS
-    my $os = `uname`;
-    chomp $os;
-
-    $timeout = 0 unless $timeout;
-    die "add_host_route needs a router and a destination\n"
-	unless $router && $routedest;
-
-    wait_for_DNS($routedest, $timeout) if $wait;
-
-    if ( $os =~ /^Linux/ ) { 
-	@cmd = ($ROUTE, 'add', $routedest, 'gw', $router);
-    }
-    elsif ( $os =~ /^FreeBSD/ ) {
-	@cmd = ($ROUTE, 'add', $routedest, $router);
-    }
-    else {
-	die "Unknown OS: $os\n";
-    }
-    system(@cmd);
-    warn join(" ", @cmd) . " failed: $?\n" if $?;
-    return $?;
-}
-
-# Connect the tap($tapno) interface to $iface at the link level.  Remove any IP
-# addresses assigned to interface to avoid confusing the routing system.  We're
-# very tolerant of errors as the bridge and other interfaces may already exist
-# when this is called.
-sub bind_tap_to_iface {
-    my($tapno, $iface) = @_;
-    my $bridge = "bridge$tapno";
-    my $tap = "tap$tapno";
-    my @addr = iface_to_addr($iface);
-
-    # Wait for the tap
-    system("$IFCONFIG $tap > /dev/null 2>/dev/null");
-    while ($?) {
-	system("$IFCONFIG $tap > /dev/null 2>/dev/null");
-    }
-
-    my $uname = `uname`;
-    chomp $uname;
-
-    if ($uname =~ /FreeBSD/) {
-	system("ifconfig $bridge create");
-	warn "Cannot create bridge: $?\n" if $?;
-	foreach my $a (@addr) {
-	    system("ifconfig $iface delete $a");
-	    warn "Cannot delete address $a: $?\n" if $?;
-	}
-	system("ifconfig $bridge addm $iface up");
-	warn "Cannot add intefrace $iface to bridge: $?\n" if $?;
-	system("ifconfig $bridge addm $tap");
-	warn "Cannot add intefrace $tap to bridge: $?\n" if $?;
-	return $?;
-    }
-    elsif ($uname =~ /Linux/) {
-	system("$IFCONFIG $iface 0.0.0.0 down");
-	system("$BRCTL addbr $bridge");
-	warn "Cannot create bridge: $?\n" if $?;
-	system("$BRCTL addif $bridge $tap");
-	system("$BRCTL addif $bridge $iface");
-	system("$BRCTL stp $bridge off");
-	system("$IFCONFIG $bridge up");
-	system("$IFCONFIG $tap up");
-	system("$IFCONFIG $iface up");
-	return $?;
-    }
-}
-
-# Return the IP addresses accociated with this interface (as a list)
-sub iface_to_addr {
-    my($iface) = @_;
-    my $ipipe = new IO::Pipe() || die "Can't create pipe for ifconfig: $!\n";
-    my @addr;
-    my $uname = `uname`;
-    my $ipre = "inet\\s+([0-9\\.]+)";
-    chomp $uname;
-
-    if ($uname =~ /Linux/) {
-	$ipre = "inet\\s+addr:\\s*([0-9\\.]+)";
-    }
-
-    $ipipe->reader("$IFCONFIG $iface");
-    while(<$ipipe>) {
-	/$ipre/ && push(@addr, $1);
-    }
-    $ipipe->close();
-    return @addr;
-}
-
-# Return the interface that packets to this host (IP or DNS) would be sent on.
-sub dest_to_iface {
-    my($dest) =@_;
-    my $rpipe = new IO::Pipe() || die "Can't create pipe for route: $!\n";
-    my $uname = `uname`;
-    chomp $uname;
-    my $route;
-    my $dev_re;
-
-    if ($uname =~ /Linux/) {
-	$route = $IPROUTE;
-	$dev_re = "\\s+dev\\s+(\\S+)";
-    }
-    elsif ($uname =~ /FreeBSD/) {
-	$route = $ROUTE;
-	$dev_re = 'interface:\\s*([[:alnum:]]+)';
-    }
-
-
-    print "$route get $dest\n";
-    $rpipe->reader("$route get $dest");
-    while (<$rpipe>) {
-	/$dev_re/ && do {
-	    my $iface = $1;
-	    $rpipe->close();
-	    print "matched: $iface\n";
-	    return $iface;
-	};
-    }
-    $rpipe->close();
-
-    die "No route to $dest\n";
-}
-
-# Return the interface bound to this IP address.  If there are more than one,
-# the first one returned by ifconfig is the one returned.
-sub addr_to_iface {
-    my($addr) = @_;
-    my $ipipe = new IO::Pipe() || die "Can't create pipe for ifconfig: $!\n";
-    my $iface;
-
-    $ipipe->reader("$IFCONFIG");
-    while(<$ipipe>) {
-	/^([[:alnum:]]+):?/ && do {
-	    $iface = $1;
-	    next;
-	};
-	/inet(\s+addr:)?\s*([0-9\.]+)/ && do {
-	    if ($2 eq $addr) {
-		$ipipe->close();
-		return $iface;
-	    }
-	};
-    }
-    $ipipe->close();
-    die "Cannot match $addr to an interface\n";
-}
-
-sub read_config {
-    my($file, $map) = @_;
-    my %param;
-    my %keywords;
-    my $f;
-
-    foreach my $k (keys %{$map}) {
-	if ( $k =~ /(\S+)=[si]/ ) {
-	    $keywords{$1} = $map->{$k};
-	    $param{$1}++;
-	}
-	else {
-	    $keywords{$k} = $map->{$k};
-	}
-    }
-
-    $f = new IO::File($file) || die "Can't open $file: $!\n";
-    while (<$f>) {
-	/^\s*([^:]+):\s*(.*)/ && do {
-	    my $keyw = $1;
-	    my $val = $2;
-
-	    $keyw =~ tr [A-Z] [a-z];
-
-	    if ($keywords{$keyw} ) {
-		if ( $param{$keyw} ) { 
-		    if ( ref($keywords{$keyw}) eq 'SCALAR') {
-			${$keywords{$keyw}} = $val;
-		    }
-		    elsif( ref($keywords{$keyw}) eq 'ARRAY') {
-			push(@{$keywords{$keyw}}, $val);
-		    }
-		    else {
-			die "Unknown variable type for $keyw\n";
-		    }
-		}
-		else  { ${$keywords{$keyw}}++; }
-	    }
-	    next;
-	};
-    }
-    $f->close();
-}
-
-
-sub config_filename {
-    # Find the configuration file in the usual places, if there is one in
-    # /usr/local/federation/etc, use it, otherwise look in the emulab standard
-    # filesystems which depends on what experiment and project we're in.
-    my $pid;
-    my $eid;
-    my $filename;
-    my $fed_dir = "/usr/local/federation/etc/";
-    my $hn = `hostname`;
-    chomp $hn;
-    $hn =~ s/\..*//;
-
-    return "$fed_dir/$hn.gw.conf" if -r "$fed_dir/$hn.gw.conf";
-
-    my $tmcd = new IO::Pipe() || die "Can't create pipe: $!\n";
-
-    $tmcd->reader("$TMCC status");
-
-    while (<$tmcd>) {
-	chomp;
-	/ALLOCATED=([^\/]+)\/(\S+)/ && do {
-	    $pid = $1;
-	    $eid = $2;
-	};
-    }
-    $tmcd->close();
-    $filename = "/proj/$pid/exp/$eid/tmp/$hn.gw.conf"
-	if $pid and $eid;
-
-    return $filename;
-}
-
-
-sub client_conf_filename {
-    # Find the configuration file in the usual places, if there is one in
-    # /usr/local/federation/etc, use it, otherwise look in the emulab standard
-    # filesystems which depends on what experiment and project we're in.
-    my $pid;
-    my $eid;
-    my $filename;
-    my $fed_dir = "/usr/local/federation/etc/";
-
-    return "$fed_dir/client.conf" if -r "$fed_dir/client.conf";
-
-    my $tmcd = new IO::Pipe() || die "Can't create pipe: $!\n";
-
-    $tmcd->reader("$TMCC status");
-
-    while (<$tmcd>) {
-	chomp;
-	/ALLOCATED=([^\/]+)\/(\S+)/ && do {
-	    $pid = $1;
-	    $eid = $2;
-	};
-    }
-    $tmcd->close();
-    $filename = "/proj/$pid/exp/$eid/tmp/client.conf"
-	if $pid and $eid;
-
-    return $filename;
-}
-
-sub wait_for_port {
-    my($addr, $port, $timeout, $sleep) = @_;
-    my $start = time();
-    $sleep = 5 unless $sleep;
-    die "Need both address and port\n" unless $addr && $port;
-
-    my $s;
-
-    while (!$s) {
-	# We've seen some arp pollution, so be proactive about clearing the
-	# cache if we're waiting to get out.
-	system("arp -d -a");
-	if (!($s = new IO::Socket(Domain => &AF_INET, PeerAddr => $addr, 
-	    PeerPort => $port))) {
-	    if ($timeout and time() - $start > $timeout) {
-		return undef;
-	    }
-	    else { sleep($sleep); }
-	}
-    }
-    $s->close();
-    return 1;
-
-}
-
-# Fling a few ping packets at the peer in the hopes that it opens doors through
-# NATs and other filters.  Practically speaking this can make a big difference.
-sub ping_peer {
-    my($peer) = @_;
-    system("ping -c 5 $peer");
-}
-
-sub testcmd_repeat {
-    my($cmd, $timeout, $sleep) = @_;
-    my $start = time();
-    $sleep = 5 unless $sleep;
-
-    while (1) {
-	system("$cmd");
-	if ($?) {
-	    if ($timeout and time() - $start > $timeout) {
-		return undef;
-	    }
-	    else { sleep($sleep); }
-	}
-	else { return 1; }
-    }
-}
-
-sub get_ip { 
-    my($name) = @_;
-    my $gwip;
-    if ( my $hent = gethostbyname($name) ) {
-	$gwip = inet_ntoa($hent->addr_list->[0]);
-    }
-    return $gwip;
-}
-
-1;
Index: fedkit/genviz.pl
===================================================================
--- fedkit/genviz.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,114 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-use XML::Parser;
-use IO::File;
-use IO::Pipe;
-
-sub genviz {
-    my($file, $outfile)= @_;
-    my %nodes;
-    my $chars;
-    my $in_node;
-    my $in_lan;
-    my $lan;
-    my %links;
-    my %lans;
-    my $rv;
-    my $dotfile = "/tmp/split$$.dot";
-    my $neato = "/usr/local/bin/neato";
-    my $g = new IO::File(">$dotfile") || return;
-    my $p = new IO::Pipe() || return;
-    my $out = new IO::File(">$outfile");
-
-    sub start_element { 
-	my($expat, $element) = @_;
-	$in_node++ if $element eq "node";
-	if ( $element eq "lan" ) {
-	    $in_lan++;
-	    $lan = {};
-	}
-    }
-
-    sub end_element {
-	my($expat, $element) = @_;
-
-	$in_node = 0 if $element eq "node";
-	$nodes{$chars} = "node" if $in_node && $element eq "vname";
-	if ($in_lan) {
-	    if ( $element ne "lan") {
-		$lan->{$element} = $chars if $element =~/(vname|vnode)/;
-	    }
-	    else {
-		$in_lan = 0;
-		my $vname = $lan->{'vname'};
-		if ( $links{$vname} && @{$links{$vname}} ==2 ) {
-		    # this link needs to be a lan
-		    $nodes{$vname} = "lan";
-		    $lans{$lan->{'vname'}} = ();
-		    foreach my $l (@{$links{$vname}}) {
-			push(@{$lans{$vname}}, $l);
-		    }
-		    push(@{$lans{$vname}}, $lan->{'vnode'});
-		    $links{$vname} = ();
-		    $lan={};
-		    return;
-		}
-		if ( $lans{$vname} && @{$lans{$vname}}) {
-		    push(@{$lans{$vname}}, $lan->{'vnode'});
-		    $lan = {};
-		    return;
-		}
-		$links{$vname} = () unless $links{$vname};
-		push(@{$links{$vname}}, $lan->{'vnode'});
-		$lan = {};
-		return;
-	    }
-	}
-    }
-    sub found_chars { 
-	my($expat, $data) = @_;
-	$chars = $data;
-    }
-
-    my $parser = new XML::Parser(Handlers => { 
-	    Start => \&start_element, 
-	    End => \&end_element,
-	    Char => \&found_chars
-	});
-
-    print "$file\n";
-    $parser->parsefile($file);
-
-    print $g "graph G {\n";
-    foreach my $n (keys %nodes) {
-	print $g "\t$n\n";
-    }
-    foreach my $l (keys %links) {
-	print $g "\t", join(" -- ", @{$links{$l}}), "\n";
-    }
-    foreach my $l (keys %lans) {
-	foreach my $n (@{$lans{$l}}) {
-	    print $g "\t $n -- $l\n";
-	}
-    }
-    print $g "}\n";
-    $g->close();
-    $p->reader("$neato  -Gstart=rand -Gepsilon=0.005 -Gmaxiter=20000 " .
-	"-Gpack=true $dotfile");
-    print $out "<vis>\n";
-    while (<$p>) {
-	/^\s*(\w+)\s+\[.*pos=\"(\d+),(\d+)\"/ && do {
-	    my ($n, $x, $y) = ($1, $2, $3);
-
-	    print "<node><name>$n</name><x>$x</x><y>$y</y><type>$nodes{$n}". 
-		"</type></node>\n" if $nodes{$n};
-	};
-    }
-    print $out "</vis>\n";
-    $p->close();
-    unlink("$dotfile");
-}
-
-genviz($ARGV[0], $ARGV[1]);
Index: fedkit/import_key.pl
===================================================================
--- fedkit/import_key.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,9 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-use gateway_lib;
-
-die "Usage $0 sourec_file dest_file" unless (@ARGV) == 2;
-
-gateway_lib::import_key($ARGV[0], $ARGV[1]);
-
Index: fedkit/make_hosts
===================================================================
--- fedkit/make_hosts	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,110 +1,0 @@
-#!/bin/sh
-
-# find perl
-if [ -x "/usr/bin/perl" ]; then
-    PERL="/usr/bin/perl"
-else
-    if [ -x "/usr/local/bin/perl" ]; then
-	PERL="/usr/local/bin/perl"
-    else
-	# Wing it...
-	PERL="perl"
-    fi
-fi
-
-# Find this experiment's stashed scripts.  (Perl for advanced parsing)
-EMUDIR="/usr/local/etc/emulab/"
-PROJECT=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$1\n";'`
-EXP=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$2\n";'`
-CONFIGDIR="/proj/$PROJECT/exp/$EXP/tmp"
-SCRIPTDIR="/usr/local/federation/bin"
-
-# Very simple script to copy the global hosts file over the local one
-# while preserving the localhost entry.  Run on DETER master clients
-
-grep 127\\.0\\.0\\.1 /etc/hosts > /tmp/hosts
-cat "$CONFIGDIR/hosts" >> /tmp/hosts
-cp /tmp/hosts /etc/hosts && rm /tmp/hosts
-
-# Find the right version of pkill.  For killing.
-if [ -x "/usr/bin/pkill" ] ; then 
-	PKILL="/usr/bin/pkill"
-else
-	if [ -x "/bin/pkill" ] ; then 
-		PKILL="/bin/pkill"
-	else
-		PKILL="echo"
-	fi
-fi
-
-# XXX: modified seer daemon to read a config file.  Not in the tarfile yet.  If
-# we see one, and there's a /usr/seer/backend/daemon.py, replace that one with
-# the local one.
-if [ -e /usr/seer/backend/daemon.py ] && [ -e $SCRIPTDIR/daemon.py ]; then
-	/bin/cp $SCRIPTDIR/daemon.py /usr/seer/backend/daemon.py 
-fi
-
-if [ -e /usr/seer/backend/experiment-setup.py ] && [ -e $SCRIPTDIR/experiment-setup.py ]; then
-	/bin/cp $SCRIPTDIR/experiment-setup.py /usr/seer/backend/experiment-setup.py 
-fi
-
-# Copy the seer.conf to the local /tmp if there is one
-
-if [ -e $CONFIGDIR/seer.conf ]; then
-	/bin/cp $CONFIGDIR/seer.conf /tmp
-fi
-
-
-# SEER feels pain and confusion if times are wrong.  This lays a big lick on
-# ntp sets the time directly and then restarts it.  XXX FreeBSD incantation is
-# untested.
-
-case `uname` in 
-	"FreeBSD")
-		/etc/rc.d/ntpd stop
-		/usr/sbin/ntpdate boss
-		/etc/rc.d/ntpd start
-		;;
-	"Linux")
-		/etc/rc.d/init.d/ntpd stop
-		/usr/sbin/ntpdate boss
-		/etc/rc.d/init.d/ntpd start
-		;;
-esac
-
-# If we need to configure an interface up for a DRAGON embedding, do it here.
-if [ -e $SCRIPTDIR/config_from_tunnelip.pl ]; then
-	$PERL $SCRIPTDIR/config_from_tunnelip.pl
-fi
-# I remain unclear why ospfd seems screwed up after the resetting of accounts
-# and mounts.  This seems to fix it, but it's not very satisfying.  At this
-# point the federated topology is complete, so any problems with routing in a
-# partial topology -e.g. failed or partial bridging - that might have confused
-# the router should be gone.
-$PKILL ospf
-$PKILL gated
-
-# XXX Danger, hack ahead.  Apparently our FC6-SMB image and emulab disagree
-# about where gated lives.  This will alias it.
-if [ ! -x /usr/sbin/gated ] ; then 
-	if [ -x /sbin/gated ] ; then
-		ln /sbin/gated /usr/sbin/gated
-	fi
-fi
-/usr/local/etc/emulab/rc/rc.route 
-
-
-# Execute any command passed in as a startcmd.  This basically daisy chains the
-# startcmd.  This needs to become a perl script to have uniform behavior here.
-echo "*$1* *$2*"
-if [ ! -z "$1" ]; then 
-	echo "calling *$1* *$2*"
-	case `uname` in
-		"FreeBSD")
-			su -l "$1" -c "$2"
-			;;
-		"Linux")
-			su "$1" --command="$2"
-			;;
-	esac
-fi
Index: fedkit/ospf_routing.pl
===================================================================
--- fedkit/ospf_routing.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-use IO::File;
-use IO::Pipe;
-
-my $IFCONFIG = "/sbin/ifconfig";
-my $OSPFD= "/usr/local/sbin/ospfd";
-my $SYSCTL= "/sbin/sysctl";
-my $PKG_ADD="/usr/sbin/pkg_add";
-
-my $fn = "/usr/local/federation/etc/ospfd.conf";
-my @pkgs = ('/usr/local/federation/pkg/libevent-1.3b.tbz', 
-    '/usr/local/federation/pkg/openospfd-4.0.tbz');
-my @live_ones;
-
-for my $p (@pkgs) {
-    die "No such package $p\n" unless -r $p;
-}
-
-system("$PKG_ADD " . join(" ", @pkgs));
-
-chomp (my $cif = `/usr/local/etc/emulab/control_interface`);
-
-my $ifp = new IO::Pipe();
-$ifp->reader("$IFCONFIG");
-while (<$ifp>) {
-    /^(\S+):.*UP/ && do {
-	push(@live_ones, $1) unless $1 eq $cif || $1 eq "lo0";
-    };
-}
-$ifp->close();
-
-my $f = new IO::File(">$fn") || die "Can't open $fn: $!\n";
-print $f <<END;
-area 0.0.0.1 {
-    interface $cif {
-	passive 
-    }
-}
-END
-print $f <<END;
-area 0.0.0.2 {
-    auth-type none
-END
-foreach my $i (@live_ones) {
-    print $f "\tinterface $i {\n\t}\n";
-}
-print $f "}\n";
-$f->close();
-system("chmod 600 $fn");
-system("$SYSCTL -w net.inet.ip.forwarding=1");
-system("$OSPFD -f $fn");
-
Index: fedkit/parsevis.py
===================================================================
--- fedkit/parsevis.py	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#!/usr/bin/python -u
-import libxml2
-
-class federated_visualization:
-    class callback:
-	def __init__(self):
-	    self.result = { };
-	    self.row = { };
-	    self.node_fields = set(["name", "x", "y", "type"]);
-	    self.float_fields = set(["x", "y"]);
-	    self.last_chars = "";
-	pass
-
-	def startDocument(self):
-	    pass
-
-	def endDocument(self):
-	    pass
-
-	def startElement(self, tag, attrs):
-	    if tag == "node": 
-		self.row = {}
-	    pass
-
-	def endElement(self, tag):
-	    if tag == "node":
-		self.result[self.row["name"]] = self.row;
-	    elif tag in self.node_fields:
-		if tag in self.float_fields:
-		    self.row[tag] = float(self.last_chars);
-		else:
-		    self.row[tag] = self.last_chars;
-		pass
-	    pass
-
-	def characters(self, data):
-	    self.last_chars = data;
-	    pass
-
-	def warning(self, msg):
-	    print "Warning: %s!" %  msg
-	    pass
-
-	def error(self, msg):
-	    print "Error: %s!" %  msg
-	    pass
-
-	def fatalError(self, msg):
-	    global log
-	    print "fatalError: %s:" % (msg)
-
-    def __init__(self, file):
-	self.handler = self.callback()
-	self.result = { };
-	libxml2.SAXParseFile(self.handler, file, 0);
-	self.result = self.handler.result;
-	libxml2.cleanupParser()
-	pass
-pass
-
-if __name__ == "__main__":
-    import sys;
-    parse = federated_visualization(sys.argv[1]);
-    print parse.result
-pass
Index: fedkit/parsevt.py
===================================================================
--- fedkit/parsevt.py	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,107 +1,0 @@
-#!/usr/bin/python -u
-import libxml2
-
-class federated_virtual_topology:
-    class callback:
-	def __init__(self):
-	    self.experiment = { };
-	    self.in_node=0;
-	    self.in_lan=0;
-	    self.rows = []
-	    self.row = { }
-	    self.node_fields = set(["vname", "ips"]);
-	    self.lan_fields = set(["vname", "vnode", "bandwidth", "delay", "member", "ip"]);
-	    self.long_fields = set(["bandwidth"]);
-	    self.float_fields = set(["delay"]);
-	    self.last_chars = "";
-	    pass
-
-	def startDocument(self):
-	    pass
-
-	def endDocument(self):
-	    pass
-
-	def startElement(self, tag, attrs):
-	    if ( tag == "node"):
-		self.in_node = 1
-	    elif tag == "lan":
-		self.in_lan = 1
-	    pass
-
-	def endElement(self, tag):
-	    if self.in_node >0 :
-		if tag in self.node_fields :
-		    if tag in self.long_fields:
-			self.row[tag] = long(self.last_chars);
-		    elif tag in self.float_fields:
-			self.row[tag] = float(self.last_chars);
-		    else:
-		        self.row[tag] = self.last_chars;
-		    pass
-		    self.last_chars = "";
-		pass
-		if tag == "node":
-		    # end of a row
-		    self.rows.append(self.row);
-		    self.row = { };
-		    self.in_node=0
-		pass
-	    pass
-	    if tag == "nodes": 
-		self.experiment["nodes"] = self.rows;
-		self.rows = [];
-	    pass
-	    if self.in_lan >0 :
-		if tag in self.lan_fields :
-		    if tag in self.long_fields:
-			self.row[tag] = long(self.last_chars);
-		    elif tag in self.float_fields:
-			self.row[tag] = float(self.last_chars);
-		    else:
-		        self.row[tag] = self.last_chars;
-		    pass
-		    self.last_chars = "";
-		pass
-		if tag == "lan":
-		    # end of a row
-		    self.rows.append(self.row);
-		    self.row = { };
-		    self.in_lan=0
-		pass
-	    pass
-	    if tag == "lans": 
-		self.experiment["lans"] = self.rows;
-		self.rows = [];
-	    pass
-
-	def characters(self, data):
-	    self.last_chars = data;
-	    pass
-
-	def warning(self, msg):
-	    print "Warning: %s!" %  msg
-	    pass
-
-	def error(self, msg):
-	    print "Error: %s!" %  msg
-	    pass
-
-	def fatalError(self, msg):
-	    global log
-	    print "fatalError: %s:" % (msg)
-
-    def __init__(self, file):
-	self.handler = self.callback()
-	self.rv = { };
-	libxml2.SAXParseFile(self.handler, file, 0);
-	self.rv["experiment"] = self.handler.experiment;
-	libxml2.cleanupParser()
-	pass
-pass
-
-if __name__ == "__main__":
-    import sys;
-    parse = federated_virtual_topology(sys.argv[1]);
-    print parse.rv
-pass
Index: fedkit/port_forward.pl
===================================================================
--- fedkit/port_forward.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,142 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-use gateway_lib;
-
-use IO::File;
-
-use Getopt::Long;
-
-my $ssh_pubkey;
-my $ssh_privkey;
-my $tunnelip;
-my $peer;
-my @ports;
-my $fedkit_dir= "/usr/local/federation";
-my $perl = "/usr/bin/perl";
-my $iface_file;
-my $ssh = "/usr/bin/ssh";
-my $use_file;
-my $ssh_port=22;
-my %opts = (
-    'ssh_pubkey=s' => \$ssh_pubkey,
-    'ssh_privkey=s' => \$ssh_privkey,
-    'tunnelip' => \$tunnelip,
-    'peer=s' => \$peer,
-    'port=s', \@ports,
-    'fedkit=s' => \$fedkit_dir,
-    'perl=s' => \$perl,
-    'ssh=s' => \$ssh,
-    'ssh_port=s' => \$ssh_port,
-    'use_file' => \$use_file,
-);
-
-exit(20) unless GetOptions(%opts);
-
-gateway_lib::read_config(gateway_lib::config_filename(), \%opts)
-    if $use_file;
-
-my $tunnelparam = $tunnelip ? '--tunnelip' : '';
-
-system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/prep_gateway.pl --peer=$peer " .
-    "--ssh_pubkey=$ssh_pubkey $tunnelparam");
-exit(20) if $?;
-
-# Remove dupes from ports
-my %mark;
-@ports = grep(!$mark{$_}++, @ports);
-
-foreach my $p (@ports) {
-    my ($type, $port, $host, $eport) = split(":", $p);
-    $eport = $port unless $eport;
-    if ($type ne "local") {
-	# We will need to resolve this host name.  Make sure we can.
-	if (!gateway_lib::get_ip($host)) {
-	    # the short form isn't resovable. Try the full domain that the
-	    # portal is in.  If that doesn't work assume the user knows better
-	    # and leave $host untouched.
-	    chomp (my $hn = `hostname`);
-	    (my $try = $hn) =~ s/^[^\.]+/$host/;
-
-	    $host = $try if gateway_lib::get_ip($try);
-	}
-    }
-    my $fopt =  ($type eq 'local'  ? "-L" : "-R") . " :$port:$host:$eport";
-    my $cmd = "$ssh -N $fopt -p $ssh_port -o \"StrictHostKeyChecking no\" " .
-	"-i $ssh_privkey $peer &";
-    system($cmd);
-    die if $?;
-}
-
-exit(0);
-
-=pod
-
-=head1 NAME
-
-B<port_forward.pl> - Do ssh service port forwarding.
-
-=head1 OPTIONS
-
-=over 8
-
-=item B<fedkit=>I<install_dir>
-
-Directory in which this software is installed.  Generally not needed.
-
-=item B<peer=>I<hostname>
-
-The other gateway providing forwarding.
-
-=item B<perl=>I<perl_binary>
- 
-Location of the perl binary.  Usually unneeded.
-
-=item B<port=>I<port_spec>
-
-Forward the given port.  Each port is given as type:lport:host:rport where
-type can be "local" or "remote".  These correspont to B<-L> and B<-R> ssh
-port forwarding, respectively.  The remaining parameters are exactly as for
-those parameters to ssh.
-
-=item B<ssh=>I<ssh_binary>
-
-The pathname of the ssh binary.  Unusally unnecessary.
-
-=item B<ssh_pubkey=>I<keyfile>
-
-A public to install as authorized.
-
-=item B<ssh_privkey=>I<identity_file>
-
-The identity to use for remote access
-
-=item B<tunnelip>
-
-True if the testbed uses the DETER tunnelip extension to provide external
-connectivity information
-
-=item B<use_file>
-
-If given read additional parameters from the file in
-/proj/I<project>/exp/I<experiment>/tmp/I<hostname>.gw/conf where those are the
-current testbed project and experiment and the hostname is before the first
-dot.  The file is option: value.
-
-
-=back
-
-=head1 SYNOPSIS
-
-In addition to providing the key initialization and DETER routing setup for a
-gateway without external access as B<active_config.pl> does, B<forward_port.pl>
-forwards the given ports using ssh.  B<forward_port.pl> does not establish low 
-level connectivity tunnels.
-
-
-=head1 AUTHORS
-
-Ted Faber <faber@isi.edu>
-
-=cut
Index: fedkit/prep_gateway.pl
===================================================================
--- fedkit/prep_gateway.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,152 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-use gateway_lib;
-
-use Getopt::Long;
-use File::Copy;
-use IO::File;
-
-my $ssh_pubkey;
-my $tunnelip;
-my $peer;
-my $use_file;
-my $fed_dir = "/usr/local/federation/";
-my %opts = (
-    'ssh_pubkey=s' => \$ssh_pubkey,
-    'tunnelip' => \$tunnelip,
-    'peer=s' => \$peer,
-    'use_file' => \$use_file,
-);
-
-exit(20) unless GetOptions(%opts);
-
-if ($use_file) {
-    gateway_lib::read_config(gateway_lib::config_filename(), \%opts)
-}
-
-my $uname = `uname`;
-chomp $uname;
-
-# on portals make sure client.conf is in the override position (in fed_dir).
-my $client_conf = gateway_lib::client_conf_filename();
-
-copy($client_conf, "$fed_dir/etc/client.conf") 
-    unless $client_conf =~ /^$fed_dir/;
-
-if ($uname =~ /Linux/) {
-    # Restart sshd with tunnel params
-    gateway_lib::set_sshd_params( 
-	{ 'GatewayPorts' => 'yes', 'PermitTunnel' => 'yes' } );
-    if ( -x "/etc/init.d/sshd") {
-	system("/etc/init.d/sshd restart");
-    }
-    elsif (-x "/etc/init.d/ssh") {
-	# XXX should look for service
-	system("/etc/init.d/ssh restart");
-    }
-    else {
-	print "Cannot figure out how to restart sshd\n";
-    }
-    gateway_lib::import_key($ssh_pubkey,'/root/.ssh/authorized_keys')
-	if $ssh_pubkey;
-    # Make sure the tap interface is available
-    system('modprobe tun');
-    # Install bridging software if not present
-    if ( -x '/usr/bin/yum' ) {
-	system('/usr/bin/yum -y install bridge-utils');
-    }
-    elsif (-x '/usr/bin/apt-get') {
-	system('/usr/bin/apt-get -y update');
-	system('/usr/bin/apt-get -y install bridge-utils');
-    }
-    else {
-	print "Cannot install bridge utils, hope they're here.\n"
-    }
-}
-elsif ($uname =~ /FreeBSD/ ){
-    gateway_lib::set_sshd_params( 
-	{ 'GatewayPorts' => 'yes', 'PermitTunnel' => 'yes' } );
-    system("/etc/rc.d/sshd restart");
-
-    gateway_lib::import_key($ssh_pubkey,'/root/.ssh/authorized_keys')
-	if $ssh_pubkey;
-
-    # Need these to make the Ethernet tap and bridge work.
-    system("kldload /boot/kernel/bridgestp.ko") 
-	if -r "/boot/kernel/bridgestp.ko"; 
-    system("kldload /boot/kernel/if_bridge.ko");
-    system("kldload /boot/kernel/if_tap.ko");
-}
-
-if ( $tunnelip ) {
-    my ($interface, $ip, $netmask, $mac, $router) = 
-	gateway_lib::deter_tunnelip();
-
-    gateway_lib::configure_outgoing_iface($interface, $ip, $netmask);
-    # Add the route to a peer.  Wait up to an hour for the peer's IP address to
-    # appear in the DNS.
-    foreach my $p (split(/\s*,\s*/, $peer)) {
-	if ($p && $router ) {
-	    gateway_lib::add_route($p, $router, 1, 60 *60);
-	    # grease the skids
-	    gateway_lib::ping_peer($p);
-	}
-    }
-}
-my $coord_fn = "$fed_dir/etc/prep_done";
-my $coord_file = new IO::File(">$coord_fn") || die "Cannot open $coord_fn";
-
-print $coord_file `date`;
-$coord_file->close();
-
-exit(0);
-
-=pod
-
-=head1 NAME
-
-B<prep_tunnel.pl> - Prepare a tunnel node for use as either a service or connectivity gateway.
-
-=head1 OPTIONS
-
-=over 8
-
-=item B<peer=>I<hostname>
-
-The other gateway providing forwarding.
-
-=item B<ssh_pubkey=>I<keyfile>
-
-A public to install as authorized.
-
-=item B<tunnelip>
-
-True if the testbed uses the DETER tunnelip extension to provide external
-connectivity information
-
-=item B<use_file>
-
-If given read additional parameters from the file in
-/proj/I<project>/exp/I<experiment>/tmp/I<hostname>.gw/conf where those are the
-current testbed project and experiment and the hostname is before the first
-dot.  The file is option: value.
-
-
-=back
-
-=head1 SYNOPSIS
-
-B<prep_gateway.pl> laods the necessary kernel modules for low-level bridging
-configures the local sshd to allow it, restarts that sshd, and installs the
-given key in root's authorized keys.
-
-If the gateway supports DETER gateway, it setablishes outside connectivity and
-adds a host rout to the given peer.
-
-=head1 AUTHORS
-
-Ted Faber <faber@isi.edu>
-
-=cut
Index: fedkit/quagga_routing.pl
===================================================================
--- fedkit/quagga_routing.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,126 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-use IO::File;
-use IO::Pipe;
-
-my $IFCONFIG = "/sbin/ifconfig";
-my $ZEBRA= "/usr/lib/quagga/zebra";
-my $OSPFD= "/usr/lib/quagga/ospfd";
-
-my $ospffn = "/usr/local/federation/etc/ospfd.conf";
-my $zebrafn = "/usr/local/federation/etc/zebra.conf";
-my @live_ones;
-my @bits_in_quad;
-my %ainfo;
-
-sub quad_to_int {
-    my($ip) = @_;
-    my @q = split(/\./, $ip);
-    return ($q[0] << 24) + ($q[1] << 16) +  ($q[2] << 8) + $q[3];
-}
-
-sub int_to_quad {
-    my($i) = @_;
-    return sprintf("%d.%d.%d.%d", ($i >> 24) & 0xff, ($i>>16) & 0xff, 
-	($i >>8) & 0xff, $i & 0xff);
-}
-
-sub nbits {
-    my($b) = @_;
-    return 0 if $b == 0;
-    my $r = 1;
-    for (my $i = 1 ; $i < $b; $i++) {
-	$r <<= 1;
-	$r += 1;
-    }
-    for (my $i = $b;  $i< 32; $i ++) {
-	$r <<= 1;
-	$r &= 0xfffffffe;
-    }
-    return $r;
-}
-
-sub netslash {
-    my($ip, $slash) = @_;
-    return int_to_quad(quad_to_int($ip) & nbits($slash));
-}
-
-for (my $i =0; $i < 256; $i++) {
-    $bits_in_quad[$i] = 0;
-}
-my $m = 0xff;
-for (my $i = 8; $i > 0; $i--) {
-    $bits_in_quad[$m] = $i;
-    $m <<= 1;
-    $m &= 0xfe;
-}
-
-
-if ( !-x $OSPFD) {
-    if (-x "/usr/bin/apt-get" ) {
-	system("/usr/bin/apt-get", "-y", "update");
-	system("/usr/bin/apt-get", "-y", "install", "quagga");
-    }
-    elsif (-x "/usr/bin/yum") {
-	system("/usr/bin/yum", "-y", "install", "quagga");
-    }
-}
-
-chomp (my $cif = `/usr/local/etc/emulab/control_interface`);
-chomp (my $hostname = `hostname`);
-$hostname =~ s/\..*//;
-
-my $ifp = new IO::Pipe();
-$ifp->reader("$IFCONFIG");
-my $current = undef;
-while (<$ifp>) {
-    /^(\S+)/ && do {
-	my $ifname = $1;
-	if ($ifname ne $cif && $ifname !~ "^lo" ) {
-	    push(@live_ones, $ifname);
-	    $current = $ifname;
-	}
-	else { $current = undef; }
-	print "$ifname $current\n";
-    };
-    /inet addr:\s*(\S+)\s*\S*\s*mask:\s*(\S+)/i && do {
-	next unless $current;
-	print "$current $1 $2\n";
-	my $slash = 0;
-	foreach my $quad (split(/\./, $2)) {
-	    if ($bits_in_quad[$quad] != 0 ) { $slash += $bits_in_quad[$quad];}
-	    else { last;}
-	}
-	$ainfo{$current} = [ $1, $slash ];
-	print $current, " ", @{$ainfo{$current}}, "\n";
-    }
-}
-$ifp->close();
-
-my $f = new IO::File(">$zebrafn") || die "Can't open $zebrafn: $!\n";
-print $f "hostname $hostname\n";
-foreach my $i (@live_ones) {
-    print $f "interface $i\n";
-}
-# Allow overriding the default route on federated nodes in DETER
-print $f "ip route 192.168.252.0/22 192.168.1.254";
-$f->close();
-my $f = new IO::File(">$ospffn") || die "Can't open $ospffn: $!\n";
-print $f "hostname $hostname\n";
-print $f "router ospf\n";
-foreach my $i (@live_ones) {
-    print $f " network ";
-    print $f netslash($ainfo{$i}->[0], $ainfo{$i}->[1]),"/",$ainfo{$i}->[1]," area 0.0.0.2\n";
-}
-$f->close();
-foreach my $fn ($zebrafn, $ospffn) {
-    system("chmod 644 $fn");
-}
-$f = new IO::File(">/proc/sys/net/ipv4/ip_forward") || 
-    die "Can't open sys forwarding file:$!\n";
-print $f "1\n";
-$f->close();
-system("$ZEBRA -d -f $zebrafn");
-system("$OSPFD -d -f $ospffn");
-
Index: fedkit/rc.fedaccounts
===================================================================
--- fedkit/rc.fedaccounts	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,118 +1,0 @@
-#!/usr/bin/perl -w
-#
-use English;
-use Getopt::Std;
-use strict;
-
-use IO::File;
-
-# Drag in path stuff so we can find emulab stuff.
-BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
-
-# Only root.
-if ($EUID != 0) {
-    die("*** $0:\n".
-	"    Must be root to run this script!\n");
-}
-
-# Script specific goo.
-#
-# These go in /var/emulab. Good for all environments!
-# 
-my $PASSDB   = "$VARDIR/db/passdb";
-my $GROUPDB  = "$VARDIR/db/groupdb";
-
-#
-# Load the OS independent support library. It will load the OS dependent
-# library and initialize itself. 
-# 
-use libsetup;
-use liblocsetup;
-use libtmcc;
-use librc;
-
-
-# The old accounts output will be in /usr/local/federation/etc/old_accts and
-# the new stuff in /usr/local/federation/etc/accts this is exactly the output
-# of tmcc accounts under the local (old) and federated (new) testbed.  We
-# delete all the stuff from the old and add all the stuff from the new.
-
-my $old_accts = "/usr/local/federation/etc/old_accts";
-my $accts = "/usr/local/federation/etc/userconf";
-
-fatal("Need both $old_accts and $accts") unless -e $old_accts && -e $accts;
-
-my $old = new IO::File $old_accts;
-my $n = new IO::File $accts;
-
-fatal("Cannot open $old_accts for reading") unless $old;
-fatal("Cannot open $accts for reading") unless $n;
-
-my @delgroups;
-my @delusers;
-
-while (<$old>) {
-    /^ADDGROUP NAME=([-\w]+)\s+GID=(\d+)/ && do {
-	push(@delgroups, $1);
-	next;
-    };
-    /^ADDUSER LOGIN=([-\w]+)/ && do {
-	push(@delusers, $1);
-    };
-}
-$old->close();
-
-# Now take 'em out
-
-foreach my $u (@delusers) {
-    # Can't delete a user who's logged in.  Log 'em out.
-    system('/usr/bin/pkill', '-u', $u) if (-x '/usr/bin/pkill');
-    print "Deleting user $u\n";
-    os_userdel($u);
-}
-
-foreach my $g (@delgroups) {
-    print "Deleting group $g\n";
-    os_groupdel($g);
-}
-
-while (<$n>) {
-    /^ADDGROUP NAME=([-\w]+)\s+GID=(\d+)/ && do {
-	my ($group, $gid) = ($1, $2);
-	print "Adding group $group($gid)\n";
-	os_groupadd($group, $gid);
-    };
-    /^ADDUSER\s+/ && do { 
-	my $login;
-	my $pswd;
-	my $uid;
-	my $gid;
-	my $root;
-	my $name;
-	my $hdir;
-	my $glist;
-	my $serial;
-	my $email;
-	my $shell;
-
-	/LOGIN=([\S]+)/ && do { $login = $1; }; 
-	/PSWD=(\S+)/ && do { $pswd=$1; } ;
-	/UID=(\d+)/ && do { $uid = $1; };
-	/GID=(\d+)/ && do { $gid = $1; };
-	/ROOT=(\d)/ && do { $root = $1; }; 
-	/NAME="([^"]*)"/ && do { $name = $1; };
-	/HOMEDIR=(\S+)/ && do { $hdir = $1; };
-	/GLIST="([^"]*)"/ && do { $glist = $1; }; 
-	/SERIAL=(\d+)/ && do { $serial = $1; };
-	/EMAIL="([^"]*)"/ && do { $email=$1; };
-	/SHELL=(\S+)/ && do { $shell = $1; };
-
-	print "Adding $login $uid $gid\n";
-	os_useradd($login, $uid, $gid, $pswd, "$glist", $hdir, $name, 
-	    $root, $shell);
-	os_mkdir($hdir, "0755") unless -e $hdir;
-	next;
-    };
-}
-$n->close();
-
Index: fedkit/setup_bridge.pl
===================================================================
--- fedkit/setup_bridge.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,101 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-use gateway_lib;
-
-use Getopt::Long;
-
-use IO::File;
-
-my $tapno;
-my $addr;
-my $dest;
-my $iface;
-my $fedkit_dir= "/usr/local/federation";
-my $perl = "/usr/bin/perl";
-my $peer;
-my $use_file;
-my %opts = (
-    'tapno=s' => \$tapno,
-    'addr=s' => \$addr,
-    'dest=s' => \$dest,
-    'peer=s' => \$peer,
-    'use_file', \$use_file,
-);
-
-exit(20) unless GetOptions(%opts);
-gateway_lib::read_config(gateway_lib::config_filename(), \%opts)
-    if $use_file;
-
-die "Only one of dest and addr is allowed\n" if $addr && $dest;
-
-$iface = $dest ? 
-    gateway_lib::dest_to_iface($dest) : gateway_lib::addr_to_iface($addr) 
-	if !$iface;
-
-print "iface is $iface\n";
-
-# Make a copy of the interface for unsetup_bridge.pl
-my $f = new IO::File(">/tmp/interface$tapno");
-print $f "$iface\n" if $f;
-$f->close( )if $f;
-
-gateway_lib::bind_tap_to_iface($tapno, $iface);
-gateway_lib::ping_peer($peer)
-    if $peer;
-
-exit(0);
-
-=pod
-
-=head1 NAME
-
-B<setup_bridge.pl> - Connect a tap and local interface.  Called both remotely
-and locally to establish the two sides of the bridge.
-
-=head1 OPTIONS
-
-=over 8
-
-=item B<addr=>I<address>
-
-Address of the local interface to connect to the given tap interface on the
-given bridge interface.
-
-=item B<dest=>I<destination>
-
-Attach the interface on which I<destination> can be reached to the given
-tap/bridge combo.
-
-=item B<tapno=>I<integer>
-
-The tap interface to connect. This will be the integer that follows tap and
-bridge in the interface names.
-
-=item B<use_file>
-
-If given read additional parameters from the file in
-/proj/I<project>/exp/I<experiment>/tmp/I<hostname>.gw/conf where those are the
-current testbed project and experiment and the hostname is before the first
-dot.  The file is option: value.
-
-
-=back
-
-=head1 SYNOPSIS
-
-B<setup_bridge.pl> connects the established ssh tunnel (a tap interface) to 
-a local interface through a bridge interface.  Traffic on the local interface
-will cross the network over the ssh tunnel and be released onto the net via a
-symmetrical setup on the peer.
-
-The interface to attach can be given either by its interface or an address/DNS
-name to reach.  In either case, all IP addresses are removed from the
-bound interface.
-
-=head1 AUTHORS
-
-Ted Faber <faber@isi.edu>
-
-=cut
Index: fedkit/smbmount.FreeBSD.pl
===================================================================
--- fedkit/smbmount.FreeBSD.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,109 +1,0 @@
-#!/usr/bin/perl
-
-#############################################################################
-# smbmounts.pl: Setup Automounter to mount via SMB for federated experiments
-# $Id: smbmount.FreeBSD.pl,v 1.1 2008-05-18 00:09:31 faber Exp $
-#
-
-$SHARE=shift || "USERS";
-$ADDR=shift || `cat /usr/local/etc/emulab/bossnode`;
-$PUSER=shift || "jhickey";
-$PNAME=shift || "emulab-ops";
-$FSTYPE=shift || "smbfs";
-$FSTAB="/etc/fstab";
-$HOMEROOT="/users";
-$PROJROOT="/proj";
-$AMDROOT="/auto";
-$AMDMAP="/etc/amd.users";
-$PAMDMAP="/etc/amd.proj";
-
-chomp $ADDR;
-
-$TMCC="/usr/local/etc/emulab/tmcc";
-$UMOUNT="/sbin/umount";
-$MOUNT="/sbin/mount";
-$MKDIR="/bin/mkdir";
-$CP="/bin/cp";
-$KILLALL="/usr/bin/killall";
-$AMD="/usr/sbin/amd";
-
-my $share = 0;
-
-print "Killing amd.\n";
-system("$KILLALL amd");
-
-print "Unmounting all nfs and smb filesystems.\n";
-system("$UMOUNT -A -f -t nfs,smbfs"); # or die("Failed to unmount NFS");
-
-# Backup the fstab so we can run multiple times
-if (! -f "$FSTAB.bak") {
-	system("$CP $FSTAB $FSTAB.bak") && die("Unable to backup $FSTAB");
-} else {
-	system("$CP $FSTAB.bak $FSTAB") && die("Unable to restore $FSTAB");
-}
-
-open(TM, "/usr/local/federation/etc/userconf")or die("Failed to open userconf");
-open(CONFIG, ">/etc/nsmb.conf") or die("Failed to open /etc/nsmb.conf");
-open(FSTAB,">>$FSTAB") or die("Cannot Open File $FSTAB");
-
-print FSTAB "\n# SMB Configuration Generated by smbmount.pl\n";
-print CONFIG "# SMB Configuration Generated by smbmount.pl\n\n";
-print CONFIG "[$SHARE]\naddr=$ADDR\n\n";
-
-while(<TM>) {
-    /ADDUSER/ && do {
-	/LOGIN=(\S+)/ && do { $user = $1; };
-	/WPSWD=(\S+)/ && do { $pswd = $1; };
-	/UID=(\S+)/ && do { $uid = $1; };
-	/GID=(\S+)/ && do { $gid = $1; };
-	/HOMEDIR=(\S+)/ && do { $homedir = $1; };
-
-	$userlc = $user;
-	# SMB demands upper case.
-	$user =~  tr/a-z/A-Z/;
-	my $pass = `smbutil crypt '$pswd'`;
-
-	print CONFIG "[$SHARE:$user]\npassword=$pass\n";
-	
-	if(! -d "$AMDROOT$homedir") {
-		system("$MKDIR -p $AMDROOT$homedir") && 
-		    die("Failed to make directory");
-	}
-
-	print FSTAB "//$user\@$SHARE/$user\t";
-	print FSTAB "$homedir\t$FSTYPE\t";
-	print FSTAB "rw,-N,-f744,-d755,-u$uid,-g$gid\t0\t0\n";
-
-	#
-	# If we are PUSER, the user assigned to mount the project directory,
-	# then we add in the mount for that.  The share is called proj-$PNAME
-	# where PNAME is the name of the project at the mothership.  We need
-	# a second map for this since we will be mounting under /proj.
-
-	if($user =~ m/$PUSER/i) {
-	    print FSTAB "//$user\@$SHARE/proj-$PNAME\t";
-	    print FSTAB "/proj/$PNAME\t$FSTYPE\t";
-	    print FSTAB "rw,-N,-f774,-d775,-u$uid,-g$gid\t0\t0\n";
-
-	    if(! -d "/proj/$PNAME") {
-		    system("$MKDIR -p /proj/$PNAME") && 
-			die("Failed to make directory");
-	    }
-	    if ( $share) {
-		print FSTAB "//$user\@$SHARE/share\t";
-		print FSTAB "/share\t$FSTYPE\t";
-		print FSTAB "rw,-N,-f774,-d775,-u$uid,-g$gid\t0\t0\n";
-
-		if(! -d "/share") {
-			system("$MKDIR -p /share") && 
-			    die("Failed to make directory");
-		}
-	    }
-	}
-    }
-}
-
-close(CONFIG);
-close(FSTAB);
-print("Mounting the $FSTYPE versions of everything\n");
-system("$MOUNT -a -t $FSTYPE");
Index: fedkit/smbmount.Linux.pl
===================================================================
--- fedkit/smbmount.Linux.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,106 +1,0 @@
-#!/usr/bin/perl
-
-#############################################################################
-# smbmounts.pl: Setup Automounter to mount via SMB for federated experiments
-# $Id: smbmount.Linux.pl,v 1.1 2008-05-18 00:09:31 faber Exp $
-#
-
-$SHARE=shift || "USERS";
-$ADDR=shift || `cat /usr/local/etc/emulab/bossnode`;
-$PUSER=shift || "jhickey";
-$PNAME=shift || "emulab-ops";
-$FSTYPE=shift || 'cifs';
-$FSTAB="/etc/fstab";
-$HOMEROOT="/users";
-$PROJROOT="/proj";
-
-my $share = 0;
-
-chomp $ADDR;
-
-# ADDR is probably a DNS name (and we assume so if it has letters.  mount cifs
-# wants an IP address, so this hex dereferences the DNS name and converts the
-# first address into the string representation of the IP.  It is, perhaps, a
-# but terse.
-if ($ADDR =~ /[a-z]/ ) {
-    my @addrs = (gethostbyname($ADDR))[4];
-    $ADDR = join(".", unpack("C4", @addrs[0]))
-	if @addrs;
-}
-
-
-$TMCC="/usr/local/etc/emulab/tmcc";
-$UMOUNT="/bin/umount";
-$MOUNT="/bin/mount";
-$MKDIR="/bin/mkdir";
-$CP="/bin/cp";
-
-print "Unmounting all nfs and cifs filesystems.\n";
-system("$UMOUNT -a -f -t nfs,cifs"); # or die("Failed to unmount NFS");
-
-# Backup the fstab so we can run multiple times
-if (! -f "$FSTAB.bak") {
-	system("$CP $FSTAB $FSTAB.bak") && die("Unable to backup $FSTAB");
-} else {
-	system("$CP $FSTAB.bak $FSTAB") && die("Unable to restore $FSTAB");
-}
-
-# open(TM, "$TMCC accounts windows |") or die("Failed to execute TMCC");
-open(TM, "/usr/local/federation/etc/userconf")or die("Failed to open userconf");
-open(FSTAB,">>$FSTAB") or die("Cannot Open File $FSTAB");
-
-print FSTAB "\n# SMB Configuration Generated by smbmount.pl\n";
-
-while(<TM>) {
-    /ADDUSER/ && do {
-	/LOGIN=(\S+)/ && do { $user = $1; };
-	/WPSWD=(\S+)/ && do { $pswd = $1; };
-	/UID=(\S+)/ && do { $uid = $1; };
-	/GID=(\S+)/ && do { $gid = $1; };
-	/HOMEDIR=(\S+)/ && do { $homedir = $1; };
-	my $ids = $FSTYPE == 'smbfs' ? ",uid=$uid,gid=$gid" : "";
-
-	#We should be even more careful about creating these files securely,
-	#confirming ownership, etc., but this is run in an restricted
-	#environment.
-	open(PWDFILE, ">/tmp/$user.cifs_creds") || 
-	    warn "Can't create credentials for $user:$!\n";
-	chmod(0600, "/tmp/$user.cifs_creds") == 1 || 
-	    warn "Credential file /tmp/$user.cifs_creds may have " .
-		"bad permissions:$!\n";
-	print PWDFILE "username=$user\npassword=$pswd\n";
-	close(PWDFILE);
-
-	print FSTAB "//$SHARE/$user\t";
-	print FSTAB "$homedir\t$FSTYPE\t";
-	print FSTAB "auto,rw,credentials=/tmp/$user.cifs_creds$ids,ip=$ADDR\t0\t0\n";
-
-	#
-	# If we are PUSER, the user assigned to mount the project
-	# directory, then we add in the mount for that.  The share is
-	# called proj-$PNAME where PNAME is the name of the project at
-	# the mothership.  We need a second map for this since we will
-	# be mounting under /proj.  We should really not use share in
-	# federation.
-	#
-
-	if($user =~ m/$PUSER/i) {
-	    print FSTAB "//$SHARE/proj-$PNAME\t";
-	    print FSTAB "$PROJROOT/$PNAME\t$FSTYPE\t";
-	    print FSTAB "rw,credentials=/tmp/$user.cifs_creds$ids,ip=$ADDR\t0\t0\n";
-	    mkdir("/$PROJROOT/$PNAME") unless -d "/$PROJROOT/$PNAME";
-	    if ( $share) {
-		print FSTAB "//$SHARE/share\t";
-		print FSTAB "/share\t$FSTYPE\t";
-		print FSTAB "rw,credentials=/tmp/$user.cifs_creds$ids,ip=$ADDR\t0\t0\n";
-
-		mkdir("/share") unless -d "/share";
-	    }
-	}
-    }
-}
-
-close(FSTAB);
-
-print("Mounting the $FSTYPE versions of everything\n");
-system("$MOUNT -a -t $FSTYPE");
Index: fedkit/splitter.conf.example
===================================================================
--- fedkit/splitter.conf.example	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,33 +1,0 @@
-# Sub experiments will have this name.  It's wise to pick a unique one
-Experiment: faber-splitter
-
-Master: deter
-TmpDir: /tmp
-Testbeds:/users/faber/testbeds
-ScriptDir: /users/faber/testbed/federation
-
-# These will be honored if used, but automatically generating the keys by
-# leaving these commented is probably better, but for now should be
-# password-free ssh keys.  Format is unimportant (dsa vs. rsa)
-# GatewayPubkey: /users/faber/fed_dsa.pub
-# GatewaySecretKey: /users/faber/fed_dsa
-
-# Type of key to auto generate.  RSA and DSA are valid choices, leaving it
-# unspecified gives you RSA keys (as long as GatewayPubKey and GatewaySecretKey
-# are not specified.
-
-GatewayKeyType: rsa
-
-# These are the SMB share to export and the user to export them as.  They
-# should probably be per-testbed parameters and probably will become so.  Any
-# user in the project instantiated on the master testbed will work.  You do not
-# need access to this user's ssh keys.
-SMBShare: USERS
-SMBUser: jhickey
-
-
-# The number of experiment links or lans that can be multiplexed over one
-# gateway pair.
-MuxLimit: 2
-
-
Index: fedkit/splitter.pl
===================================================================
--- fedkit/splitter.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ fedkit/splitter.pl	(revision 1a8a08a09737337f998508eac6c2a6b29020f0f7)
@@ -1,185 +1,5 @@
 #!/usr/bin/perl
 
-use strict;
-
 use Getopt::Std;
-use IO::File;
-use IO::Dir;
-use IO::Pipe;
-use File::Copy;
-use XML::Parser;
-
-my @scripts = ("fed_bootstrap", "federate.sh", "smbmount.FreeBSD.pl", 
-    "smbmount.Linux.pl", "make_hosts", "fed-tun.pl", "fed_evrepeater",
-    "rc.accounts.patch");
-my $local_script_dir = ".";
-my($pid, $gid);			# Process and group IDs for calling parse.tcl
-my $splitter_config;		# Configuration file
-my $debug;			# True if thecalled in debug mode
-my $verbose;			# True for extra progress reports
-my $startem;			# If true, start the sub-experiments
-my $eid;			# Experiment ID
-my $tcl;			# The experiment description (topology file)
-my $master;			# Master testbed
-my $tmpdir;			# tmp files
-my $tb_config;			# testbed configurations
-my $smb_share;			# Share to mount from the master
-my $project_user;		# User to mount project dirs as
-my $auth_proj;			# Local project for resource access
-my($gw_pubkey, $gw_pubkey_base);# Connector pubkey (full path & basename)
-my($gw_secretkey, $gw_secretkey_base);# Connector secret key (full path & 
-				# basename)
-my($keytype);			# Type (DSA or RSA) of generated gateway keys
-my $tcl_splitter;		# tcl program to split experiments
-				# (changed during devel)
-my $tclsh;			# tclsh to call directly (changed during devel)
-my $fedd_client;		# Program to call for testbed access params
-my $muxmax;			# Maximum number of links/lans over 1 gw pair
-my @tarfiles;			# Tarfiles in use by this experiment
-my @rpms;			# Rpms in use by this experiment
-my $timeout;			# The timeout to use for experiment swap ins
-my %opts;			# Parsed options
-
-my $tbparams = {};		# Map of the per-testbed parameters from the
-				# testbeds file.  It is a reference to a hash
-				# of hashes (because it's passed around a bunch
-				# and it's nicer to have one access pattern
-				# throughout the script, in the main loop and
-				# the subroutines).  That access is exemplified
-				# by  $tbparams->{'deter'}->{'domain'} which is
-				# the domain parameter of the DETER testbed.  
-my $fail_soft;			# Do not swap failed sub-experiments out
-my $max_children=1;		# Maximum number of simultaneous swap-ins
-
-# Default commands for starting experiment and gateway nodes.  Testbeds can
-# override these.  (The 'm' prefixed commands are for operating as the master
-# testbed.)
-my $def_expstart = "sudo -H /bin/sh FEDDIR/fed_bootstrap >& /tmp/federate";
-my $def_mexpstart = "sudo -H FEDDIR/make_hosts FEDDIR/hosts";
-my $def_gwstart = "sudo -H FEDDIR/fed-tun.pl -f GWCONF>& /tmp/bridge.log";
-my $def_mgwstart = "sudo -H FEDDIR/fed-tun.pl -f GWCONF >& /tmp/bridge.log";
-my $def_gwimage = "FBSD61-TUNNEL2";
-my $def_gwtype = "pc";
-
-# Parse the config file.  The format is a colon-separated parameter name
-# followed by the value of that parameter to the end of the line.  This parses
-# that format and puts the parameters into the referenced hash.  Parameter
-# names are mapped to lower case, parameter values are unchanged.  Returns 0 on
-# failure (e.g. file open) and 1 on success.
-sub parse_config {
-    my($file, $href) = @_;
-    my $fh = new IO::File($file);
-	
-    unless ($fh) {
-	warn "Can't open $file: $!\n";
-	return 0;
-    }
-
-    while (<$fh>) {
-	next if /^\s*#/ || /^\s*$/;	# Skip comments & blanks
-	chomp;
-	/^([^:]+):\s*(.*)/ && do {
-	    my $key = $1; 
-
-	    $key =~ tr/A-Z/a-z/;
-	    $href->{$key} = $2;
-	    next;
-	};
-	warn "Unparasble line in $file: $_\n";
-    }
-    $fh->close();   # It will close when it goes out of scope, but...
-    return 1;
-}
-
-# Parse an easier-to-read testbeds file (the original was comma-separated
-# unadorned strings).  The format is a testbed scope as [testbed] followed by
-# the colon-separated attribute-value pairs for the testbed.  Right now these
-# go into a set of global hashes indexed by testbed, but that should probably
-# change.  The file parameter is an open IO::Handle.  &parse_testbeds_filename
-# opens the file and calls this.  Parse_testbeds can be used on pipes as well,
-# e.g. fedd_client output.
-sub parse_testbeds {
-    my($fh, $tbparams) = @_;	    # Testbeds file and parameter hash
-    my $tb;			    # Current testbed
-    # Convert attribute in the file to tbparams hash key
-    my %attr_to_hash = (
-	"opsnode" => "host",
-	"user" => "user",
-	"domain" => "domain",
-	"project" => "project",
-	"connectortype" => "gwtype",
-	"slavenodestartcmd" => "expstart",
-	"slaveconnectorstartcmd" => "gwstart",
-	"masternodestartcmd" => "mexpstart",
-	"masterconnectorstartcmd" => "mgwstart",
-	"connectorimage" => "gwimage",
-	"fileserver" => "fs",
-	"boss" => "boss",
-	"eventserver" => "eventserver",
-	"tunnelcfg" => "tun",
-	"uri" => "uri",
-	"access" => "access"
-    );
-
-    while (<$fh>) {
-	next if /^\s*#/ || /^\s*$/;	# Skip comments & blanks
-	print STDERR "testbeds: $_";
-	chomp;
-	/^\s*\[(.*)\]/ && do {
-	    $tb = $1;
-	    $tbparams->{$tb} = {} unless $tbparams->{$tb};
-	    next;
-	};
-
-	/^([^:]+):\s*(.*)/ && do {
-	    unless ($tb) {
-		warn "Ignored attribute definition before testbed: $_\n ";
-		next;
-	    }
-	    my $key = $1; 
-	    $key =~ tr/A-Z/a-z/;
-	    my $var = $attr_to_hash{$key};
-
-	    if ($var) { $tbparams->{$tb}->{$var} = $2; }
-	    else { warn "Unknown keyword $key\n"; }
-
-	    next;
-	};
-	warn "Unparasble line: $_\n";
-    }
-    return 1;
-}
-
-
-# Open the given file name and parse the testbeds file it contains by calling
-# &parse_testbeds.
-sub parse_testbeds_filename {
-    my($file, $tbparams) = @_;	    # Testbeds file and parameter hash
-    my $fh = new IO::File($file);   # Testbeds filehandle
-
-    if ($fh) {
-	my $rv = &parse_testbeds($fh, $tbparams);
-	$fh->close();   # It will close when it goes out of scope, but...
-	$rv;
-    }
-    else {
-	warn "Can't open $file: $!\n";
-	return 0;
-    }
-}
-
-# Generate SSH keys for use by the gateways.  The parameters are the type and
-# the filename for the private key.  The pubkey will be stored in a filename
-# with the same name as the private key but with .pub appended.  Type can be
-# dsa or rsa.
-
-sub generate_ssh_keys {
-    my($type, $dest) = @_;
-
-    $type =~ tr/A-Z/a-z/;
-    return 0 if $type !~ /(rsa|dsa)/;
-    system("/usr/bin/ssh-keygen -t $type -N \"\" -f $dest");
-    return $@ ? 0 : 1;
-}
 
 # use scp to transfer a file, reporting true if successful and false otherwise.
@@ -190,8 +10,8 @@
 # current user is used.
 sub scp_file {
-    my($file, $user, $host, $dest) = @_;
+    my($file, $where, $dest) = @_;
 
     # XXX system with a relative pathname is sort of gross
-    system("scp $file $user\@$host:$dest");
+    system("scp $file $where:$dest");
     if ($?) {
 	warn "scp failed $?\n";
@@ -205,173 +25,68 @@
 # command to execute, and a prefix to be placed on a message generated if the
 # command fails.   On failure print a warning if a warning prefix was given and
-# return false.  If timeout is given fork a process and set an alarm of that
-# many seconds.  Timeouts also return 0;
+# return false.
 sub ssh_cmd {
-    my($user, $host, $cmd, $wname, $timeout) = @_;
-    my $pid;		    # Child pid
-
-    $timeout = 0 unless $timeout;   # Force default timeout
-
-    if ( $pid = fork () ) {
-	# Parent process
-	# The eval acts as a signal catcher.  If the alarm goes off inside
-	# the eval, the die will put "alarm\n" into $@, otherwise the
-	# return value of the execution in the child process will be used.
-	my $rv = eval {
-	    local $SIG{'ALRM'} = sub{ die "alarm\n"; };
-	    my $rv;
-
-	    alarm $timeout;
-	    $rv = waitpid($pid, 0);
-	    alarm 0;
-	    $rv;
-	};
-
-	# If the eval succeeded, $@ will be null and we can use $rv, which
-	# is the return code from the subprocess.  If the eval timed out,
-	# print a warning and assume the best.
-	if ($@ eq "alarm\n" ) {
-	    warn "$wname timed out - pid $pid still live\n";
-	    return 1;
-	}
-	else {
-	    return $rv;
-	}
+    my($user, $host, $cmd, $wname) = @_;
+
+    # XXX system with a relative pathname is sort of gross
+    if ( $host ne "localhost") {
+	system ("ssh $user\@$host $cmd");
     }
     else {
-	# Child process
-	exec("ssh $user\@$host $cmd");
-	exit 0;
-    }
-}
-
-# Ship local copies of the federation scripts out to the given host.  If any of
-# the script transfers fails, return 0.  The scripts to transfer are from the
-# global @scripts and are found locally in $local_script_dir (another global).
-sub ship_scripts {
-    my($host, $user, $dest_dir) = @_;	    # Where, who, where remotely
-    my $s;
-
-    &ssh_cmd($user, $host, "mkdir -p $dest_dir");
-    for $s (@scripts) {
-	&scp_file("$local_script_dir/$s", $user, $host, $dest_dir) || 
-	    return 0;
-    }
-    return 1;
-}
-
-# Ship per-testbed configuration generated by this script to the remote /proj
-# directories on the remote testbeds
-sub ship_configs {
-    my($host, $user, $src_dir, $dest_dir) = @_;	    # Where, who, where remotely
-    my($d, $f);
-
-    $d = IO::Dir->new($src_dir) || return 0;
-
-    # All directories under $tmpdir are 770 so we can delete them later.
-    &ssh_cmd($user, $host, "mkdir -p $dest_dir") || return 0;
-    &ssh_cmd($user, $host, "chmod 770 $dest_dir") || return 0;
-    while ( $f = $d->read()) {
-	next if $f =~ /^\./;
-	if ( -d "$src_dir/$f" ) {
-	    &ship_configs($host, $user, "$src_dir/$f", "$dest_dir/$f") || 
-		return 0;
-	}
-	else {
-	    &scp_file("$src_dir/$f", $user, $host, $dest_dir) || return 0;
-	}
-    }
-    return 1;
-}
+	system ("$cmd");
+    }
+    if ($?) {
+	warn "$wname failed $?\n" if $wname;
+	return 0;
+    }
+    else { return 1; }
+}
+
+
 
 # Start a sub section of the experiment on a given testbed.  The testbed and
 # the user to start the experiment as are pulled from the global per-testbed
-# hash, passed in as $tbparams, as is the project name on the remote testbed.
-# Parameters are the testbed and the experiment id.  Configuration files are
-# scp-ed over to the target testbed from the global $tmpdir/$tb directory.
-# Then the current state of the experiment determined using expinfo.  From that
-# state, the experiment is either created, modified or spapped in.  If
-# everything succeeds, true is returned.  If the global verbose is set progress
-# messages are printed.
+# hash, as is the project name on the remote testbed.  Parameters are the
+# testbed and the experiment id.  Configuration files are scp-ed over to the
+# target testbed.  Then the current state of the experiment determined using
+# expinfo.  From that state, the experiment is either created, modified or
+# spapped in.  If everything succeeds, true is returned.
 sub start_segment {
-    my($tb, $eid, $tbparams, $timeout) = @_;# testbed, experiment ID, 
-					    # per-testbed parameters and remote
-					    # swap-in timeout
-    my $host =				    # Host name of remote ops (FQDN)
-	$tbparams->{$tb}->{'host'} . $tbparams->{$tb}->{'domain'};
-    my $user = $tbparams->{$tb}->{'user'};  # user to pass to ssh
-    my $pid = $tbparams->{$tb}->{'project'};# remote project to start the
+    my($tb, $eid) = @_;			    # testbed and experiment ID
+    my($host) = $host{$tb};		    # Host name of remote users
+    my($user) = $user{$tb};		    # user to pass to ssh
+    my($pid) = $project{$tb};		    # remote project to start the
 					    # experiment under
-    my $tclfile = "./$eid.$tb.tcl";	    # Local tcl file with the
+    my($tclfile) = "./$eid.$tb.tcl";	    # Local tcl file with the
 					    # sub-experiment
-    my $proj_dir = "/proj/$pid/exp/$eid/tmp";  # Where to stash federation stuff
-    my $tarfiles_dir = "/proj/$pid/tarfiles/$eid";  # Where to stash tarfiles
-    my $rpms_dir = "/proj/$pid/rpms/$eid";  # Where to stash rpms
-    my $to_hostname = "$proj_dir/hosts";    # remote hostnames file
-    my $state;				    # State of remote experiment
-    my $status = new IO::Pipe;		    # The pipe to get status
+    my($to_hostname) = "/proj/$pid/hosts.$eid"; # remote hostnames file
 
     # Determine the status of the remote experiment
-    $status->reader("ssh $user\@$host /usr/testbed/bin/expinfo $pid $eid") || 
-	die "Can't ssh to $user\@$host:$!\n";
+    if ( $host ne "localhost") {
+	open(STATUS, "ssh $user\@$host /usr/testbed/bin/expinfo $pid $eid|") || 
+	    die "Can't ssh to $user\@$host:$!\n";
+    }
+    else {
+	open(STATUS, "/usr/testbed/bin/expinfo $pid $eid|") || 
+	    die "Can't call expinfo locally";
+    }
     # XXX: this is simple now.  Parsing may become more complex
-    while (<$status>) {
+    while (<STATUS>) {
 	/State: (\w+)/ && ($state = $1);
 	/No\s+such\s+experiment/ && ($state = "none");
     }
-    $status->close();
+    close(STATUS);
     print "$tb: $state\n";
 
-    # Copy the experiment definition data over 
-    print "transferring subexperiment to $tb\n" if $verbose;
-    &scp_file("$tmpdir/$tb/$tclfile", $user, $host) || return 0;
-    # Clear out any old experiment data; if not deleted, copies over it by
-    # different users will fail.
-    # (O /bin/csh, how evil thou art.  The -c and the escaped single quotes
-    # force the /bin/sh interpretation of the trailing * (which we need to keep
-    # tmp around))  Again, this needs to be done more properly once we have a
-    # non-ssh interface here.)
-    print "clearing experiment subdirs on $tb\n" if $verbose;
-    &ssh_cmd($user, $host, "/bin/sh -c \\'/bin/rm -rf $proj_dir/*\\'") || 
-	return 0;
-    print "clearing experiment tarfiles subdirs on $tb\n" if $verbose;
-    &ssh_cmd($user, $host, "/bin/rm -rf $tarfiles_dir/") || 
-	return 0;
-    print "creating tarfiles subdir $tarfiles_dir on $tb\n" if $verbose;
-    &ssh_cmd($user, $host, "mkdir -p $tarfiles_dir", "create tarfiles") || 
-	return 0;
-    print "clearing experiment rpms subdirs on $tb\n" if $verbose;
-    &ssh_cmd($user, $host, "/bin/rm -rf $rpms_dir/") || 
-	return 0;
-    print "creating rpms subdir $rpms_dir on $tb\n" if $verbose;
-    &ssh_cmd($user, $host, "mkdir -p $rpms_dir", "create rpms") || 
-	return 0;
+    # Copy the configuration data over (unless the host is local)
+    if ( $host ne "localhost") {
+	&scp_file($tclfile, "$user\@$host") || return 0;
+	&scp_file("./hostnames", "$user\@$host", $to_hostname) || return 0;
+    }
+
     # Remote experiment is active.  Modify it.
     if ($state eq "active") {
-	print "Transferring federation support files to $tb\n" if $verbose;
-	# First copy new scripts and hostinfo into the remote /proj
-	&scp_file("$tmpdir/hostnames", $user, $host, $to_hostname) ||
-	    return 0;
-	# Copy the virtual topology out as well
-	&scp_file("$tmpdir/vtopo.xml", $user, $host, "$proj_dir/vtopo.xml") ||
-	    return 0;
-	&scp_file("$tmpdir/viz.xml", $user, $host, "$proj_dir/viz.xml") ||
-	    return 0;
-	&ship_scripts($host, $user, $proj_dir) || return 0;
-	&ship_configs($host, $user, "$tmpdir/$tb", $proj_dir) || return 0;
-
-	if ( -d "$tmpdir/tarfiles") {
-	    &ship_configs($host, $user, "$tmpdir/tarfiles", $tarfiles_dir) || 
-		return 0;
-	}
-
-	if ( -d "$tmpdir/rpms") {
-	    &ship_configs($host, $user, "$tmpdir/rpms", $rpms_dir) || 
-		return 0;
-	}
-
-	print "Modifying $eid in place on $tb\n" if $verbose;
 	&ssh_cmd($user, $host, "/usr/testbed/bin/modexp -r -s -w $pid " . 
-	    "$eid $tclfile", "modexp", $timeout) || return 0;
+	    "$eid $tclfile", "modexp") || return 0;
 	return 1;
     }
@@ -379,74 +94,15 @@
     # Remote experiment is swapped out, modify it and swap it in.
     if ($state eq "swapped") {
-	print "Transferring federation support files to $tb\n" if $verbose;
-	# First copy new scripts and hostinfo into the remote /proj (because
-	# the experiment exists, the directory tree should be there.
-	&scp_file("$tmpdir/hostnames", $user, $host, $to_hostname) ||
-	    return 0;
-	# Copy the virtual topology out as well
-	&scp_file("$tmpdir/vtopo.xml", $user, $host, "$proj_dir/vtopo.xml") ||
-	    return 0;
-	&scp_file("$tmpdir/viz.xml", $user, $host, "$proj_dir/viz.xml") ||
-	    return 0;
-	&ship_scripts($host, $user, $proj_dir) || return 0;
-	&ship_scripts($host, $user, $proj_dir) || return 0;
-	&ship_configs($host, $user, "$tmpdir/$tb", $proj_dir) || return 0;
-	if ( -d "$tmpdir/tarfiles") {
-	    &ship_configs($host, $user, "$tmpdir/tarfiles", $tarfiles_dir) || 
-		return 0;
-	}
-
-	if ( -d "$tmpdir/rpms") {
-	    &ship_configs($host, $user, "$tmpdir/rpms", $rpms_dir) || 
-		return 0;
-	}
-
-	print "Modifying $eid on $tb\n" if $verbose;
 	&ssh_cmd($user, $host, "/usr/testbed/bin/modexp -w $pid $eid $tclfile", 
 	    "modexp") || return 0;
-	print "Swapping $eid in on $tb\n" if $verbose;
-	# Now start up
 	&ssh_cmd($user, $host, "/usr/testbed/bin/swapexp -w $pid $eid in", 
-	    "swapexp", $timeout) || return 0;
+	    "swapexp") || return 0;
 	return 1;
     }
 
-    # No remote experiment.  Create one.  We do this in 2 steps so we can put
-    # the configuration files and scripts into the new experiment directories.
+    # No remote experiment.  Create one.
     if ($state eq "none") {
-
-	if ( -d "$tmpdir/tarfiles") {
-	    # Tarfiles have to exist for the creation to work
-	    print "copying tarfiles to $tb\n";
-	    &ship_configs($host, $user, "$tmpdir/tarfiles", $tarfiles_dir) || 
-		return 0;
-	}
-
-	if ( -d "$tmpdir/rpms") {
-	    &ship_configs($host, $user, "$tmpdir/rpms", $rpms_dir) || 
-		return 0;
-	}
-
-	print "Creating $eid on $tb\n" if $verbose;
-	&ssh_cmd($user, $host, "/usr/testbed/bin/startexp -i -f -w -p " . 
+	&ssh_cmd($user, $host, "/usr/testbed/bin/startexp -i -w -p " . 
 	    "$pid -e $eid $tclfile", "startexp") || return 0;
-	# After startexp succeeds, the per-experiment directories exist on the
-	# remote testbed.
-	print "Transferring federation support files to $tb\n" if $verbose;
-	# First copy new scripts and hostinfo into the remote /proj
-	&scp_file("$tmpdir/hostnames", $user, $host, $to_hostname) ||
-	    return 0;
-	# Copy the virtual topology out as well
-	&scp_file("$tmpdir/vtopo.xml", $user, $host, "$proj_dir/vtopo.xml") ||
-	    return 0;
-	&scp_file("$tmpdir/viz.xml", $user, $host, "$proj_dir/viz.xml") ||
-	    return 0;
-	&ship_scripts($host, $user, $proj_dir) || return 0;
-	&ship_scripts($host, $user, $proj_dir) || return 0;
-	&ship_configs($host, $user, "$tmpdir/$tb", $proj_dir) || return 0;
-	# Now start up
-	print "Swapping $eid in on $tb\n" if $verbose;
-	&ssh_cmd($user, $host, "/usr/testbed/bin/swapexp -w $pid $eid in", 
-	    "swapexp", $timeout) || return 0;
 	return 1;
     }
@@ -462,12 +118,9 @@
 # start_segment, though much simpler.
 sub stop_segment {
-    my($tb, $eid, $tbparams) = @_;	    # testbed, experiment ID and 
-					    # per-testbed parameters
-    my $user = $tbparams->{$tb}->{'user'};  # testbed user
-    my $host =				    # Ops node
-	$tbparams->{$tb}->{'host'} . $tbparams->{$tb}->{'domain'};
-    my $pid = $tbparams->{$tb}->{'project'};# testbed project
-
-    print "Stopping $eid on $tb\n" if $verbose;
+    my($tb, $eid) = @_;
+    my($user) = "$user{$tb}";
+    my($host) = "$host{$tb}";
+    my($pid) = $project{$tb};
+
     &ssh_cmd($user, $host, "/usr/testbed/bin/swapexp -w $pid $eid out", 
 	"swapexp (out)") || return 0;
@@ -475,131 +128,6 @@
 }
 
-# Fill tbparams with results from the fedd call.  The command is passed in and
-# a string with any relevant error conditions is returned.  undef is success.
-sub fedd_access_request{
-    my($cmd) = @_;
-    my($rv)=undef;
-
-    system("$cmd 2> /tmp/splitter.err.$$ > /tmp/splitter.$$" );
-
-    if ( ! $? ) {
-	&parse_testbeds_filename("/tmp/splitter.$$", $tbparams) ||
-	    ($rv =  "Error reading fedd output: $!\n");
-    }
-    else {
-	my $f = new IO::File("/tmp/splitter.err.$$");
-	$rv =  "Fedd_client error:\n";
-	while (<$f>) { $rv .= $_; }
-	$f->close();
-    }
-    unlink("/tmp/splitter.$$", "/tmp/splitter.err.$$");
-    return $rv;
-}
-
-# Generate visualization info from the topo file.
-sub genviz {
-    my($file, $outfile)= @_;
-    my %nodes;
-    my $chars;
-    my $in_node;
-    my $in_lan;
-    my $lan;
-    my %links;
-    my %lans;
-    my $rv;
-    my $dotfile = "/tmp/split$$.dot";
-    my $neato = "/usr/local/bin/neato";
-    my $g = new IO::File(">$dotfile") || return;
-    my $p = new IO::Pipe() || return;
-    my $out = new IO::File(">$outfile") || die "open $!\n";
-
-    sub start_element { 
-	my($expat, $element) = @_;
-	$in_node++ if $element eq "node";
-	if ( $element eq "lan" ) {
-	    $in_lan++;
-	    $lan = {};
-	}
-    }
-
-    sub end_element {
-	my($expat, $element) = @_;
-
-	$in_node = 0 if $element eq "node";
-	$nodes{$chars} = "node" if $in_node && $element eq "vname";
-	if ($in_lan) {
-	    if ( $element ne "lan") {
-		$lan->{$element} = $chars if $element =~/(vname|vnode)/;
-	    }
-	    else {
-		$in_lan = 0;
-		my $vname = $lan->{'vname'};
-		if ( $links{$vname} && @{$links{$vname}} ==2 ) {
-		    # this link needs to be a lan
-		    $nodes{$vname} = "lan";
-		    $lans{$lan->{'vname'}} = ();
-		    foreach my $l (@{$links{$vname}}) {
-			push(@{$lans{$vname}}, $l);
-		    }
-		    push(@{$lans{$vname}}, $lan->{'vnode'});
-		    delete $links{$vname};
-		    $lan={};
-		    return;
-		}
-		if ( $lans{$vname} && @{$lans{$vname}}) {
-		    push(@{$lans{$vname}}, $lan->{'vnode'});
-		    $lan = {};
-		    return;
-		}
-		$links{$vname} = () unless $links{$vname};
-		push(@{$links{$vname}}, $lan->{'vnode'});
-		$lan = {};
-		return;
-	    }
-	}
-    }
-    sub found_chars { 
-	my($expat, $data) = @_;
-	$chars = $data;
-    }
-
-    my $parser = new XML::Parser(Handlers => { 
-	    Start => \&start_element, 
-	    End => \&end_element,
-	    Char => \&found_chars
-	});
-
-    print "$file\n";
-    $parser->parsefile($file);
-
-    print $g "graph G {\n";
-    foreach my $n (keys %nodes) {
-	print $g "\t\"$n\"\n";
-    }
-    foreach my $l (keys %links) {
-	print $g "\t", join(" -- ", @{$links{$l}}), "\n";
-    }
-    foreach my $l (keys %lans) {
-	foreach my $n (@{$lans{$l}}) {
-	    print $g "\t \"$n\" -- \"$l\"\n";
-	}
-    }
-    print $g "}\n";
-    $g->close();
-    $p->reader("$neato  -Gstart=rand -Gepsilon=0.005 -Gmaxiter=20000 " .
-	"-Gpack=true $dotfile");
-    print $out "<vis>\n";
-    while (<$p>) {
-	/^\s*"?([\w\-]+)"?\s+\[.*pos=\"(\d+),(\d+)\"/ && do {
-	    my ($n, $x, $y) = ($1, $2, $3);
-
-	    print $out "<node><name>$n</name><x>$x</x><y>$y</y><type>" . 
-		"$nodes{$n}</type></node>\n" if $nodes{$n};
-	};
-    }
-    print $out "</vis>\n";
-    $p->close();
-    unlink("$dotfile");
-}
+$tcl_splitter = "/usr/testbed/lib/ns2ir/parse.tcl";	    # tcl program to split experiments
+$tclsh = "/usr/local/bin/otclsh";   # tclsh to call directly
 
 $pid = $gid = "dummy";		    # Default project and group to pass to
@@ -608,193 +136,40 @@
 				    # use them at all, but we supply them to
 				    # keep our changes to the parser minimal.
+
 # Argument processing.
-getopts('Ft:c:p:f:ndvNP:', \%opts);
-$splitter_config = $opts{'c'} || "./splitter.conf";
-$debug = $opts{'d'};
-$verbose = $opts{'v'} || $opts{'d'};
-
-&parse_config("$splitter_config", \%opts) || 
-    die "Cannot read config file $splitter_config: $!\n";
-
-warn "-N does nothing now.  Only one testbeds format supported.\n"
-    if $opts{'N'};
-$fail_soft = $opts{'F'} || $opts{'failsoft'};
-$startem = $opts{'n'} ? 0 : 1;		# If true, start the sub-experiments
-$timeout = $opts{'t'} || $opts{'timeout'};
-$eid = $opts{'experiment'};		# Experiment ID
-$tcl = $opts{'f'} || shift;		# The experiment description
-$master = $opts{'master'};		# Master testbed
-$tmpdir = $opts{'tmpdir'} || $opts{'tempdir'}|| "/tmp"; # tmp files
-$tb_config = $opts{'testbeds'} || "./testbeds";	# testbed configurations
-$local_script_dir = $opts{'scriptdir'};	# Local scripts
-$muxmax  = $opts{'muxlimit'} || 3;	# Number of connections muxed on one
-					# gateway
-
-$max_children = $opts{'p'} || $opts{'maxchildren'} 
-    if $opts{'p'} || $opts{'maxchildren'};
-
-$smb_share = $opts{'smbshare'} ||	# Share to mount from the master
-    die "Must give an SMB share\n";
-$project_user = $opts{'smbuser'} ||	# User to mount project dirs as
-    die "Must give an SMB user\n";
-$auth_proj = $opts{'P'};
-
-# tcl program to split experiments (changed during devel)
-$tcl_splitter = $opts{'tclparse'} || "/usr/testbed/lib/ns2ir/parse.tcl";
-# tclsh to call directly (changed during devel)
-$tclsh = $opts{'tclsh'} || "/usr/local/bin/otclsh";
-# fedd_client to get testbed access parameters
-$fedd_client = $opts{'feddclient'} || "fedd_client";
-
-# Prefix to avoid collisions
-$tmpdir .= "/split$$";
-
-print "Temp files are in $tmpdir\n" if $verbose;
-# Create a workspace
-unless (-d "$tmpdir") {
-    mkdir("$tmpdir") || die "Can't create $tmpdir: $!";
-}
-
-# If the keys are given, use them.  Otherwise create a set under $tmpdir
-
-if ( $opts{'gatewatpubkey'} && $opts{'gatewaysecretkey'}) {
-    $gw_pubkey = $opts{'gatewaypubkey'};
-    $gw_secretkey = $opts{'gatewaysecretkey'};
-}
-else {
-    $keytype = $opts{'gatewaykeytype'} || "rsa";
-    mkdir("$tmpdir/keys") || die "Can't create temoprary key dir: $!\n";
-    $gw_pubkey = "$tmpdir/keys/fed.$keytype.pub";
-    $gw_secretkey = "$tmpdir/keys/fed.$keytype";
-    print "Generating $keytype keys\n" if $verbose;
-    generate_ssh_keys($keytype, $gw_secretkey) || 
-	die "Cannot generate kets:$@\n";
-}
-# Generate the basenames
-($gw_pubkey_base = $gw_pubkey) =~ s#.*/##;
-($gw_secretkey_base = $gw_secretkey) =~ s#.*/##;
-
-
-
-# Validate scripts directory
-for my $s (@scripts) {
-    die "$local_script_dir/$s not in local script directory. Try -d\n"
-	unless -r "$local_script_dir/$s";
-}
+getopts('c:m:e:f:n', \%opts);
+
+$eid = $opts{'e'};		    # Experiment ID
+$tcl = $opts{'f'} || shift;	    # The experiment description
+$master = $opts{'m'};		    # Master testbed
+$startem = $opts{'n'} ? 0 : 1;	    # If true, start the sub-experiments
+$config = $opts{'c'} || "./testbeds";
 
 die "Must supply file, master and experiment" unless $master && $tcl && $eid;
 
-&parse_testbeds_filename($tb_config, $tbparams) ||
-    die "Cannot testbed congfigurations from $tb_config: $!\n";
+# Read a hash of per-testbed parameters from the local configurations.
+open(CONF, $config) || die "can't read testbed configutions from $config: $!\n";
+while (<CONF>) {
+    next if /^#/;
+    chomp;
+    ($tb, $h, $u, $p, $es, $gs, $mes, $mgs, $t, $i) = split(":", $_);
+    $host{$tb} = $h;
+    $user{$tb} = $u;
+    $project{$tb} = $p;
+    $gwtype{$tb} = $t;
+    $expstart{$tb} = $es;
+    $gwstart{$tb} = $gs;
+    $mexpstart{$tb} = $mes;
+    $mgwstart{$tb} = $mgs;
+    $gwimage{$tb} = $i;
+}
+close(CONF);
 
 # Open a pipe to the splitter program and start it parsing the experiments
-my $pipe = new IO::Pipe;
-# NB no more -p call on parse call.
-$pipe->reader("$tclsh $tcl_splitter -s -x $muxmax -m $master  $pid $gid $eid $tcl") || 
-    die "Cannot execute $tclsh $tcl_splitter -s -x $muxmax -m $master $pid $gid $eid $tcl:$!\n";
-
-# Parsing variables
-my $ctb;			# Current testbed
-my %allocated;			# If allocated{$tb} > 0, $tb is in use
-my $destfile;			# File that the sub-experiment tcl file is
-				# being written to, or "" if none.  Also used
-				# for hostnames file.
-my $desthandle;			# File handle for distfile
-my $gateways;			# when gateway lists are being processed this
-				# is the testbed whose gateways are being
-				# gathered.
-my $control_gateway;		# Control net gateway for the current testbed
-my %active_end;			# If active_end{"a-b"} > 0 then a is the active
-				# end of the a <-> b connector pair.
-my $vtopo;			# IO::File for virtual topology info
-
-# Parse the splitter output.  This loop creates the sub experiments, gateway
-# configurations and hostnames file
-while (<$pipe>) {
-    # Vtopo is virtual topology about the entire experiment. Copy it to the
-    # $tmpdir for distribution far and wide.
-    (/^#\s+Begin\s+Vtopo/../^#\s+End\s+Vtopo/) && do {
-	/^#\s+Begin/ && do {
-	    $vtopo = new IO::File(">$tmpdir/vtopo.xml");
-	    warn "Can't open $tmpdir/vtopo.xml:$!\n" unless $vtopo;
-	    next;
-	};
-	/^#\s+End/ && do {
-	    $vtopo->close() if $vtopo;
-	    undef $vtopo;
-	    genviz("$tmpdir/vtopo.xml", "$tmpdir/viz.xml");
-	    next;
-	};
-	print $vtopo $_  if $vtopo;
-	next;
-    };
-    # Allbeds lists all the testbeds that this experiment accesses.  This code
-    # acquires access to them and pulls in their access parameters from fedd.
-    (/^#\s+Begin\s+Allbeds/../^#\s+End\s+Allbeds/) && do {
-	next if /^#/;
-	chomp;
-
-	my $tb;		# Current testbed
-	my @nodes;	# Current testbed node requests
-
-	# The Allbeds line has the testbed name first separated by the node
-	# requirements of the testbeds.  A node requirement is separated form
-	# teh testbed name and other node requirements by a vertical bar (|).
-	# This pulls the testbed off the front (which must be present) and
-	# splits the node descriptors out by the vertical bar.  The first
-	# vertical bar (the one after the testbed) is removed by the intial
-	# regular expression to avoid a null entry in @nodes.  The node
-	# requests are of the form image:type:count and can be passed directly
-	# to fedd_client as parameters.
-	/([^|]+)\|?(.*)/ && do {
-	    my $n;	# Scratch
-
-	    ($tb , $n) = ($1, $2);
-	    @nodes = split(/\|/, $n);
-	};
-
-	# If this testbed has not had its access parameters read from fedd, try
-	# to read them, if we have a way to talk to fedd
-	unless ($tbparams->{$tb}->{'access'} || !$fedd_client) { 
-	    my $access_pipe = new IO::Pipe || 
-		die "Can't open pipe to fedd:$!\n";
-	    my $proj = $auth_proj ? " -p $auth_proj " : "";
-	    my @cmds;
-	    my $rv;
-
-	    print("Checking access to $tb using " . $tbparams->{$tb}->{'uri'}
-		. "\n") if $verbose;
-
-	    # First access command, implicitly uses localhost fedd
-	    push(@cmds,"$fedd_client -t " . 
-		$tbparams->{$tb}->{'uri'} .  " -T $ENV{HOME}/cacert.pem ".
-		"-l $tb $proj" . (@nodes ? " -n " : " ") .
-		join(" -n ", @nodes));
-	    # Second try access command, implicitly directly contact testbed
-	    push(@cmds,"$fedd_client -t " . 
-		$tbparams->{$tb}->{'uri'} .  " -u " .
-		$tbparams->{$tb}->{'uri'} .  " -T $ENV{HOME}/cacert.pem ".
-		"-l $tb $proj" . (@nodes ? " -n " : " ") .
-		join(" -n ", @nodes));
-	    # Third try access command, implicitly directly contact testbed
-	    # using only federated id.
-	    push(@cmds,"$fedd_client -f -a -t " . 
-		$tbparams->{$tb}->{'uri'} .  " -u " .
-		$tbparams->{$tb}->{'uri'} .  " -T $ENV{HOME}/cacert.pem ".
-		"-l $tb $proj" . (@nodes ? " -n " : " ") .
-		join(" -n ", @nodes));
-
-	    foreach my $c (@cmds) {
-		print "$c\n" if $verbose;
-		$rv = &fedd_access_request($c);
-		warn($rv) if $rv;
-
-		last if $rv eq undef;
-	    }
-	    die "Cannot get access to $tb\n"  if $rv;
-	}
-	next;
-    };
-
+open(PIPE, "$tclsh $tcl_splitter -s -p $pid $gid $eid $tcl|") || 
+    die "Cannot execute $tclsh $tcl_splitter -s -p $pid $gid $eid $tcl:$!\n";
+
+# Parse the splitter output.
+while (<PIPE>) {
     # Start of a sub-experiment
     /^#\s+Begin\s+Testbed\s+\((\w+)\)/ && do {
@@ -802,17 +177,13 @@
 
 	# If we know the testbed, start collecting its sub experiment tcl
-	# description.  If not, warn the user.
-	if ($tbparams->{$ctb}->{'access'}) {
+	# description.  If not, warn the caller and ignore the configuration of
+	# this testbed.
+	if ($host{$ctb}) {
 	    $allocated{$ctb}++;	# Keep track of the testbeds allocated
-
-	    unless (-d "$tmpdir/$ctb") {
-		mkdir("$tmpdir/$ctb") || die "Can't create $tmpdir/$ctb: $!";
-	    }
-	    $destfile = "$tmpdir/$ctb/$eid.$ctb.tcl";
-
-	    $desthandle = new IO::File(">$destfile") || 
-		die "Cannot open $destfile:$!\n";
+	    $destfile = "./$eid.$ctb.tcl";
+
+	    open(FILE, ">$destfile") || die "Cannot open $destfile:$!\n";
 	}
-	else{
+	else { 
 	    warn "No such testbed $ctb\n";
 	    $destfile = "";
@@ -820,53 +191,10 @@
 	next;
     };
-
     # End of that experiment
     /^#\s+End\s+Testbed\s+\((\w+)\)/ && do {
 	# Simple syntax check and close out this experiment's tcl description
 	die "Mismatched testbed markers ($1, $ctb)\n" unless ($1 eq $ctb);
-	$desthandle->close() if $desthandle;
+	close(FILE);
 	$destfile = $ctb = "";
-	next;
-    };
-
-    # Beginning of a gateway set
-    /^#\s+Begin\s+gateways\s+\((\w+)\)/ && do {
-	$gateways = $1;
-	# If we've heard of this tb, create the config lines for it one at a
-	# time.
-	if ($allocated{$gateways}) {
-	    # Just in case.  This directory should already have been created
-	    # above.
-	    unless (-d "$tmpdir/$gateways") {
-		mkdir("$tmpdir/$gateways") || 
-		    die "Can't create $tmpdir/$gateways: $!";
-	    }
-	}
-	else {
-	    warn "Gateways given (and ignored) for testbed not in use: " .
-		"$gateways\n";
-	    $gateways = 0;
-	}
-	next;
-    };
-    # End of the gateways section.  Output the client config for this testbed
-    /^#\s+End\s+gateways\s+\((\w+)\)/ && do {
-	die "Mismatched gateway markers ($1, $gateways)\n" 
-	    unless !$gateways || $gateways == $1;
-
-	if ($control_gateway ) {
-	    # Client config
-	    my $cc = new IO::File(">$tmpdir/$gateways/client.conf");
-	    my $master_project = $tbparams->{$master}->{'project'};
-	    die "Can't open $tmpdir/$gateways/client.conf: $!\n" unless $cc;
-	    print $cc "ControlGateway: $control_gateway\n";
-	    print $cc "SMBShare: $smb_share\n";
-	    print $cc "ProjectUser: $project_user\n";
-	    print $cc "ProjectName: $master_project\n";
-	    $cc->close();
-	}
-	else { warn "No control gateway for $gateways?\n"; }
-	    
-	$gateways = 0;
 	next;
     };
@@ -874,259 +202,56 @@
     # file.
     /^#\s+Begin\s+hostnames/ && do {
-	$destfile = "$tmpdir/hostnames";
-	$desthandle = new IO::File(">$destfile") || 
-	    die "Can't open $destfile:$!\n";
+	$destfile = "./hostnames";
+	open(FILE, ">$destfile") || die "Can't open $destfile:$!\n";
 	next;
     };
     # end of the hostnames list.
     /^#\s+End\s+hostnames/ && do {
-	$desthandle->close();
+	close(FILE);
 	$destfile = "";
 	next;
     };
 
-    # Generate gateway configuration info, one file per line
-    $gateways && do {
-	chomp;
-	my($dtb, $myname, $desthost, $type) = split(" ", $_);
-
-	# Many of these are to simplify print statements
-	my $sdomain =				# domain for the source
-	    $tbparams->{$gateways}->{'domain'};
-	my $ddomain =				# domain for the destination
-	    $tbparams->{$dtb}->{'domain'};
-	my $sproject =				# Project of the source
-	    $tbparams->{$gateways}->{'project'};
-	my $dproject =				# Project of the destination
-	    $tbparams->{$dtb}->{'project'};
-	my $fs =				# Master fs node (FQDN)
-	    $tbparams->{$master}->{'fs'} .  $tbparams->{$master}->{'domain'};
-	my $boss =				# Master boss node (FQDN)
-	    $tbparams->{$master}->{'boss'} .  $tbparams->{$master}->{'domain'};
-	my $event_server =			# Master event-server (FQDN)
-	    $tbparams->{$master}->{'eventserver'} .  
-	    $tbparams->{$master}->{'domain'};
-	my $remote_event_server =		# Slave event-server (FQDN)
-	    $tbparams->{$dtb}->{'eventserver'} .  
-	    $tbparams->{$dtb}->{'domain'};
-	my $remote_script_dir =			# Remote fed script location
-	    "/proj/" . $dproject . "/exp/$eid/tmp";
-	my $local_script_dir =			# Local fed script location
-	    "/proj/" . $sproject . "/exp/$eid/tmp";
-	my $active;				# Is this the active side of
-						# the connector?
-	my $tunnel_cfg =			# Use DETER's config stuff
-	    $tbparams->{$gateways}->{'tun'} || "false";
-				    
-
-	$sdomain = ".$eid." . $tbparams->{$gateways}->{'project'} . "$sdomain";
-	$ddomain = ".$eid." . $tbparams->{$dtb}->{'project'} . "$ddomain";
-
-	my $conf_file = "$myname$sdomain.gw.conf";
-	my $remote_conf_file = "$desthost$ddomain.gw.conf";
-	# translate to lower case so the `hostname` hack for specifying
-	# configuration files works.
-	$conf_file =~ tr/A-Z/a-z/;
-	$remote_conf_file =~ tr/A-Z/a-z/;
-
-	# If either end of this link is in the master side of the testbed, that
-	# side is the active end. Otherwise the first testbed encountered in
-	# the file will be the active end.  The $active_end variable keeps
-	# track of those decisions
-	if ( $dtb eq $master ) { $active = "false"; }
-	elsif ($gateways eq $master ) { $active = "true"; }
-	elsif ( $active_end{"$dtb-$gateways"} ) { $active="false"; }
-	else { $active_end{"$gateways-$dtb"}++; $active = "true"; }
-
-	# This is used to create the client configuration.
-	$control_gateway = "$myname$sdomain"
-	    if $type =~ /(control|both)/;
-
-	# Write out the file
-	my $gwconfig = new IO::File(">$tmpdir/$gateways/$conf_file")|| 
-	    die "can't open $tmpdir/$gateways/$conf_file: $!\n";
-
-	print $gwconfig "Active: $active\n";
-	print $gwconfig "TunnelCfg: $tunnel_cfg\n";
-	print $gwconfig "BossName: $boss\n";
-	print $gwconfig "FsName: $fs\n";
-	print $gwconfig "EventServerName: $event_server\n";
-	print $gwconfig "RemoteEventServerName: $remote_event_server\n";
-	print $gwconfig "Type: $type\n";
-	print $gwconfig "RemoteScriptDir: $remote_script_dir\n";
-	print $gwconfig "EventRepeater: $local_script_dir/fed_evrepeater\n";
-	print $gwconfig "RemoteExperiment: $dproject/$eid\n";
-	print $gwconfig "LocalExperiment: $sproject/$eid\n";
-	print $gwconfig "RemoteConfigFile: " . 
-	    "$remote_script_dir/$remote_conf_file\n";
-	print $gwconfig "Peer: $desthost$ddomain\n";
-	print $gwconfig "Pubkeys: " . 
-	    "/proj/$sproject/exp/$eid/tmp/$gw_pubkey_base\n";
-	print $gwconfig "Privkeys: " .
-	    "/proj/$sproject/exp/$eid/tmp/$gw_secretkey_base\n";
-	$gwconfig->close();
-
-	# This testbed has a gateway (most will) so make a copy of the keys it
-	# needs in this testbed's subdirectory.  start_segment will transfer
-	# them.
-	unless (-r "$tmpdir/$gateways/$gw_pubkey_base" ) {
-	    copy($gw_pubkey, "$tmpdir/$gateways/$gw_pubkey_base") ||
-		die "Can't copy pubkeys ($gw_pubkey to " . 
-		    "$tmpdir/$gateways/$gw_pubkey_base): $!\n";
-	}
-	if ($active eq "true" ) {
-	    unless (-r "$tmpdir/$gateways/$gw_secretkey_base" ) {
-		copy($gw_secretkey, "$tmpdir/$gateways/$gw_secretkey_base") ||
-		    die "Can't copy secret keys ($gw_secretkey to " . 
-			"$tmpdir/$gateways/$gw_secretkey_base): $!\n";
-	    }
-	}
-
-	#done processing gateway entry, ready for next line
-	next; 
-    };
-    (/^#\s+Begin\s+tarfiles/../^#\s+End\s+tarfiles/) && do {
-	next if /^#/;
-	chomp;
-	push(@tarfiles, $_);
-	next;
-    };
-    (/^#\s+Begin\s+rpms/../^#\s+End\s+rpms/) && do {
-	next if /^#/;
-	chomp;
-	push(@rpms, $_);
-	next;
-    };
-
     next unless $destfile;  # Unidentified testbed, ignore config
-    # local copies that can be used in the substitutions below
-    my $gwtype = $tbparams->{$ctb}->{'gwtype'} || $def_gwtype;
-    my $gwimage = $tbparams->{$ctb}->{'gwimage'} || $def_gwimage;
-    my $mgwstart = $tbparams->{$ctb}->{'mgwstart'} || $def_mgwstart;
-    my $mexpstart = $tbparams->{$ctb}->{'mexpstart'} || $def_mexpstart;
-    my $gwstart = $tbparams->{$ctb}->{'gwstart'} || $def_gwstart;
-    my $expstart = $tbparams->{$ctb}->{'expstart'} || $def_expstart;
-    my $project = $tbparams->{$ctb}->{'project'};
 
     # Substitute variables
-    s/GWTYPE/$gwtype/g;
-    s/GWIMAGE/$gwimage/g;
+    s/GWTYPE/$gwtype{$ctb}/g;
+    s/GWIMAGE/$gwimage{$ctb}/g;
     if ($ctb eq $master ) {
-	s/GWSTART/$mgwstart/g;
-	s/EXPSTART/$mexpstart/g;
+	s/GWSTART/$mgwstart{$ctb}/g;
+	s/EXPSTART/$mexpstart{$ctb}/g;
     }
     else {
-	s/GWSTART/$gwstart/g;
-	s/EXPSTART/$expstart/g;
-    }
-    # XXX: oh is this bad
-    s#GWCONF#FEDDIR\`hostname\`.gw.conf#g;
-    s#PROJDIR#/proj/$project/#g;
-    s#EID#$eid#g;
-    s#FEDDIR#/proj/$project/exp/$eid/tmp/#g;
-    print $desthandle $_;
-}
-$pipe->close();
+	s/GWSTART/$gwstart{$ctb}/g;
+	s/EXPSTART/$expstart{$ctb}/g;
+    }
+    print FILE;
+}
+close(PIPE);
 die "No nodes in master testbed ($master)\n" unless $allocated{$master};
 
-# Copy tarfiles and rpms needed at remote sites to the staging directories.
-# Start_segment will distribute them
-for my $t  (@tarfiles) {
-    die "tarfile '$t' unreadable: $!\n" unless -r $t;
-    unless (-d "$tmpdir/tarfiles") {
-	mkdir("$tmpdir/tarfiles") || 
-	    die "Can't create $tmpdir/tarfiles:$!\n";
-    }
-    copy($t, "$tmpdir/tarfiles") || 
-	die "Can't copy $t to  $tmpdir/tarfiles:$!\n";
-}
-
-for my $r  (@rpms) {
-    die "rpm '$r' unreadable: $!\n" unless -r $r;
-    unless (-d "$tmpdir/rpms") {
-	mkdir("$tmpdir/rpms") || 
-	    die "Can't create $tmpdir/rpms:$!\n";
-    }
-    copy($r, "$tmpdir/rpms") || 
-	die "Can't copy $r to  $tmpdir/rpms:$!\n";
-}
-
 exit(0) unless $startem;
-
-my %started;		    # If $started{$tb} then $tb successfully started
-my %child;		    # If $child{$pid} then a process with that pid is
-			    # working on a starting a segment
-my $nworking = 0;	    # Number of children working on swapin
-my $pid;		    # Scratch variable for pids
 
 # Start up the slave sub-experiments first
 TESTBED:
-for my $tb  (keys %allocated) {
-    if ( $tb ne $master ) {
-	while ( $nworking == $max_children ) {
-	    print "Waiting for a child process to complete\n" if $verbose;
-	    if (($pid = wait()) != -1 ) {
-		# The $? >> 8 is the exit code of the subprocess, which is
-		# non-zero if the &start_segment routine failed.
-		my $exit_code = ($? >> 8);
-
-		print "Child $pid completed exit code ($exit_code)\n"
-		    if $verbose;
-		$nworking--;
-		$started{$child{$pid}}++ unless $exit_code;
-		if ($child{$pid} ) { delete $child{$pid}; }
-		else { warn "Reaped a pid we did not start?? ($pid)\n"; }
-		last TESTBED if $exit_code;
-	    }
-	    else { warn "wait returned without reaping: $!\n"; }
-	}
-	if ( $pid = fork() ) {
-	    # Parent process
-	    $nworking ++;
-	    $child{$pid} = $tb;
-	    print "Started process $pid to start testbed $tb\n"
-		if $verbose;
-	}
-	else {
-	    # Child.  Note that we reverse the sense of the return code when it
-	    # becomes an exit value.  Zero exit values indicate success.
-	    exit(!&start_segment($tb, $eid, $tbparams, $timeout));
-	}
-    }
-}
-
-# Now wait for any still running processes.
-while ( $nworking ) {
-    print "Waiting for a child process to complete ($nworking running)\n" 
-	if $verbose;
-    if (($pid = wait()) != -1 ) {
-	# The $? >> 8 is the exit code of the subprocess, which is
-	# non-zero if the &start_segment routine failed.
-	my $exit_code = ($? >> 8);
-
-	print "Child $pid completed exit code ($exit_code)\n"
-	    if $verbose;
-	$nworking--;
-	$started{$child{$pid}}++ unless $exit_code;
-	if ($child{$pid} ) { delete $child{$pid}; }
-	else { warn "Reaped a pid we did not start?? ($pid)\n"; }
-    }
-    else { warn "wait returned without reaping: $!\n"; }
+for $tb (keys %allocated) {
+    if ($tb ne $master) {
+	if (&start_segment($tb, $eid)) { $started{$tb}++; }
+	else { last TESTBED; }
+    }
 }
 
 # Now the master
-if (&start_segment($master, $eid, $tbparams, $timeout)) { 
+if (&start_segment($master, $eid)) { 
     $started{$master}++;
 }
 
 # If any testbed failed, swap the rest out.
-if ( !$fail_soft && scalar(keys %started) != scalar(keys %allocated)) {
-    for my $tb (keys %started) { &stop_segment($tb, $eid, $tbparams); }
+if ( scalar(keys %started) != scalar(keys %allocated)) {
+    for $tb (keys %started) { &stop_segment($tb, $eid); }
     print "Error starting experiment\n";
     exit(1);
 }
 print "Experiment started\n";
-print "Deleting $tmpdir (-d to leave them in place)\n" if $verbose && !$debug;
-system("rm -rf $tmpdir") unless $debug;
 exit(0);    # set the exit value
 
@@ -1139,6 +264,6 @@
 =head1 SYNOPSIS
 
-B<splitter.pl> [B<-ndF>] [B<-t> I<secs>] [B<-c> F<config_file>]
-    [B<-f> F<experiment_tcl>] [B<-p> I<max_procs>] [F<experiment_tcl>]
+B<splitter.pl> B<-e> I<experiment> B<-m> I<master_testbed> [B<-n>] 
+    [B<-c> I<config_file>] [B<-f> I<experiment_tcl>] [I<experiment_tcl>]
 
 =head1 DESCRIPTION
@@ -1149,149 +274,35 @@
 tb-set-node-testbed command, added to the parser.
 
-Much of the script's behavior depends on the configuration file, specified with
-the B<-c> flag and defaulting to F<./splitter.conf>.
-
-The testbed labels supplied in the B<tb-set-node-testbed> command are
-meaningful based on their presence in the testbeds file.  that file can be
-specified in the configuration file using the B<Testbeds> directive, and
-defaults to F<./testbeds>.  The syntax is described below.
-
-Most of the intermediate files are staged in a sub-directory of a temporary
-files directory and deleted at the end of the script.  Specifying the B<-d>
-flag on the command line avoids the deletion for debbugging.  By default the
-temporary files directory is directory is F</tmp> and can be reset in the
-configuration file using the B<Tmpdir> directive.  Intermediate files are
-stored under a subdirectory formed by adding the process ID of the splitter
-process.  For example, if the temporary files directory is F</tmp> and the
-B<splitter.pl> process ID is 2323, the temporary files will be stored in
-F</tmp/split2323/>.
+The testbed labels are meaningful based on their presence in the testbeds file.
+that file can be specified with the B<-c> option, and defaults to
+F<./testbeds>.  The syntax is described below.
 
 The expreriment is split out into one experiment description per testbed in the
-temporary directory named as F<experiment.testbed.tcl> where the experiment is
-the experiment ID given in the configuration file, and the testbed is the
-tb-set-node-testbed parameter for the nodes in the file.
+current directory named as F<experiment.testbed.tcl> where the experiment is
+the argument to B<-e> and the testbed is the tb-set-node-testbed parameter for
+the nodes in the file.
 
 If the B<-n> option is absent the sub-experiments are then instantiated on
 their testbeds.  (Here B<-n> is analogous to its use in L<make(1)>).
-Per-testbed parameters are set in the testbeds file.  Sub-experiments on
+Per-testbed parameters are set in the configuration file.  Sub-experiments on
 slave testbeds are instantiated in a random order, but the master testbed is
 currently instantiated last.
 
-Slave testbeds can be swapped in in parallel by specifying the B<-p> parameter
-and the maximum number of simultaneous processes to start.
-
-Scripts to start federation (the federation kit) are copied into the local
-experiment's tmp file - e.g., F</proj/DETER/exp/simple-split/tmp>.  These are
-taken from the directory given by the B<ScriptDir> directive in the
-configuration file.
-
-If B<-t> is given the parameter is treated as a parameter to B<Timeout> in 
-F<splitter.conf>.
-
 If any sub-experiment fails to instantiate, the other sub-exeriments are
-swapped out.  B<-F> avoids this swap out, which can also be specified as 
-B<SoftFail: true> in F<splitter.conf>
-
-=head2 Configuration File
-
-The configuration file is a simple set of colon-separated parameters and
-values.  A configuration file must be present, either specified in the B<-c>
-flag or the default F<./splitter.conf>.  All the parameter names are case
-insensitive, but should not include any whitespace.  Parameter values may
-include whitespace, but no newlines.
-
-Possible parameters are:
+swapped out.
+
+=head2 Configuration file
+
+The configuration file (F<./testbeds> unless overridden by B<-c>) is a
+colon-separated set of parameters keyed by testbed name.  The fields, in order,
+are:
 
 =over 5
 
-=item Experiment
-
-The name of the experiment on the various testbeds
-
-=item Master
-
-The master testbed label from the testbeds file, described below.
-
-=item Testbeds
-
-The testbeds file described below, giving per-testbed parameters.  If this
-directive is absent the testbeds file defaults to F<./testbeds>
-
-=item ScriptDir
-
-Location of the default federation scripts, i.e. the federation kit.
-
-=item GatewayPubkey
-
-=item GatewaySecretKey
-
-The names of the files containing secret and public keys to use in setting up
-tunnels between testbeds.  If given they are used, otherwise keys are generated.
-
-=item GatewayKeyType
-
-This controls the kind of SSH keys generated to configure the geatways.  If
-given this must be B<dsa> or B<rsa>, and it defaults to B<rsa>.  The parameter
-is csase insensitive.
-
-=item TmpDir
-
-=item TempDir
-
-The directory where temporary files are created.  These are synonyms, but
-should both be specified, B<TmpDir> has priority.  If neither is specified,
-F</tmp> is used.
-
-=item SMBShare
-
-The SMB share on the master testbed that will be exported to remote clients.
-
-=item SMBUser
-
-The experiment user to mount project directories as.  This user needs to be a
-member of the exported experiment - that is one of the users in the project
-containing this experiment on the master testbed.
-
-=item Timeout
-
-Value in seconds after which a swap-in operatioin will be considered a success.
-Often long swap-ins will hang when there are partial failures.  This works
-around this issue.  (This behavior can be requested on the command line by
-specifying B<-t> I<secs>.)
-
-=item FailSoft
-
-If not set, failure of any sub experiment swaps the rest out.  Setting this to
-any value avoids this swap out.  (This behavior can be requested on the command
-line by specifying B<-F>.)
-
-=item MuxLimit
-
-The maximum bumber of links/lans carried by one gateway pair
-
-=item Tclparse
-
-The pathname to the experiment parsing program.  Only developers should set
-this.
-
-=item Tclsh
-
-The pathname to the local oTcl shell.  Only developers should set
-this.
-
-=back
-
-=head2 Testbeds file
-
-The configuration file (F<./testbeds> unless overridden by B<-c>) is a file of
-scoped attribute-value pairs where each attribute is specified on a separate
-line of the configuration file.  Each testbed's parameters are preceeded by the
-testbed label in brackets ([]) on a line by itself.  After that the parameters
-are specified as parameter: value.  This is essentially the same format as the
-configuration file.  Parameters are:
-
-=over 4
-
-=item User
+=item name
+
+The testbed to which this line of parameters applies.
+
+=item user
 
 The user under which to make requests to this testbed.  The user running
@@ -1299,87 +310,40 @@
 testbed.
 
-=item OpsNode
-
-The host name of the testbed's ops node.  The user calling B<splitter.pl> must
-be able to execute commands on this host via L<ssh(1)>.
-
-=item Domain
-
-The domain of nodes in this testbed (including the ops host).  This parameter
-should always start with a period.
-
-=item Project
+=item project
 
 The project under which to instantiate sub-experiments on this testbed.
 
-=item ConnectorType
-
-The node type for inter-testbed connector nodes on this testbed.
-
-=item SlaveNodeStartCmd
+=item gateway type
+
+The node type for inter-testbed gateway nodes on this testbed.
+
+=item experiment start (slave)
 
 The start command to run on experimental nodes when this testbed is used as a
-slave.  In all the start commands the following string substitutions are made:
-
-=over 10
-
-=item FEDDIR
-
-The local experiment's federation scripts directory.  Each local experiment
-will have this replaced by the scripts directory on its local boss.
-
-=item GWCONF 
-
-The full pathname of the gateway configuration file.  As with FEDDIR, this is
-on the local boss.
-
-=item PROJDIR
-
-The project directory on the local boss.
-
-=item EID
-
-The local experiment name.
+slave.
+
+=item gateway start (slave)
+
+The start command to run on gateway nodes when this testbed is used as a
+slave.
+
+=item experiment start (master)
+
+The start command to run on experimental nodes when this testbed is used as a
+master.
+
+=item gateway start (master)
+
+The start command to run on gateway nodes when this testbed is used as a
+master.
+
+=item gateway image
+
+The disk image to be loaded on a gateway node on this testbed.
 
 =back
 
-All startcmds specified in F<testbeds> undergo these expansions.
-
-=item SlaveConnectorStartCmd
-
-The start command to run on gateway nodes when this testbed is used as a slave.
-The same string substitutions are made in this command as in SlaveNodeStartCmd.
-
-=item MasterNodeStartCmd
-
-The start command to run on experimental nodes when this testbed is used as a
-master.  The same string substitutions are made in this command as in
-SlaveNodeStartCmd.
-
-=item MasterConnectorStartCmd
-
-The start command to run on gateway nodes when this testbed is used as a
-master.  The same string substitutions are made in this command as in
-SlaveNodeStartCmd.
-
-=item ConnectorImage
-
-The disk image to be loaded on a gateway node on this testbed.
-
-=item FileServer
-
-The node in the master testbed from which filesystems are mounted.
-
-=item Boss
-
-The node in the master testbed that controls the testbed.
-
-=item TunnelCfg
-
-True if the connector needs to do DETER federation.  This parameter will
-probably be removed.
-
-
-=back
+The parsing of the configuration is extremely simple.  Colons separate each
+field and there is n provision for escaping them at this time.
 
 =head1 ENVIRONMENT
@@ -1389,10 +353,4 @@
 environment.
 
-=head1 BUGS
-
-A deprecated B<-N> flag was used to select testbeds file format.  Only one
-format is supported now, and B<-N> generates a warning, but otherwise does not
-affect B<splitter.pl>.
-
 =head1 SEE ALSO
 
Index: fedkit/start_seer.pl
===================================================================
--- fedkit/start_seer.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,71 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-use gateway_lib;
-
-use IO::File;
-
-use Getopt::Long;
-
-my $ssh_pubkey;
-my $ssh_privkey;
-my $active;
-my $tunnelip;
-my $peer;
-my $fedkit_dir= "/usr/local/federation";
-my $perl = "/usr/bin/perl";
-my $iface_file = "/var/emulab/boot/ifmap";
-my $ssh = "/usr/bin/ssh";
-my $seer;
-my $ssh_port = 22;
-my @ports;
-my $use_file;
-my $ssh_privkey;
-
-my %opts = (
-    'peer=s' => \$peer,
-    'ssh_privkey=s' => \$ssh_privkey,
-    'fedkit=s' => \$fedkit_dir,
-    'perl=s' => \$perl,
-    'ssh=s' => \$ssh,
-    'use_file' => \$use_file,
-    'seer' => \$seer,
-);
-
-exit(20) unless GetOptions(%opts);
-
-if ($use_file) {
-    gateway_lib::read_config(gateway_lib::config_filename(), \%opts)
-}
-
-my $client = gateway_lib::client_conf_filename();
-my $f = new IO::File($client);
-my $eid;
-my $pid;
-
-while (<$f>) {
-    /^ExperimentID:\s+(\S+)/ && do {
-	($pid, $eid) = split("/", $1);
-    };
-}
-$f->close();
-while (!-e "/proj/$pid/exp/$eid/tbdata/node.pem") {
-    print "Waiting for key\n";
-    sleep(10);
-}
-
-my $cmd = "/usr/bin/scp  -o \"StrictHostKeyChecking no\" " .
-    "-i $ssh_privkey /proj/$pid/exp/$eid/tbdata/*.pem $peer:$fedkit_dir/etc";
-print "calling $cmd\n";
-system($cmd);
-
-my $cmd = "$ssh  -o \"StrictHostKeyChecking no\" -o \"ForwardX11 no\" " .
-    "-i $ssh_privkey $peer python /usr/local/seer/experiment-setup.py " . 
-    "-F -c 0 Basic &";
-print "calling $cmd\n";
-system($cmd);
-
-$cmd = "python /usr/local/seer/experiment-setup.py -r control.$eid.$pid -r $peer Basic";
-print "Calling $cmd\n";
-system($cmd);
Index: fedkit/static_routing.pl
===================================================================
--- fedkit/static_routing.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,34 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-use IO::File;
-
-my $IFCONFIG = "/sbin/ifconfig";
-my $ROUTE = "/sbin/route";
-my $IPROUTE = "/sbin/ip";
-my $hostname = `hostname`;
-my $routefile = "/usr/local/federation/etc/route/";
-
-$hostname =~ s/\..*//;
-$routefile = "$routefile$hostname";
-
-my $f = new IO::File($routefile) || die "No routing file: $!\n";
-while (<$f>) {
-    chomp;
-    my ($dest, $gw) = split;
-    if (-x $IPROUTE ) {
-	my $cmd = "$IPROUTE route add $dest via $gw";
-	print("$cmd\n");
-	system("$cmd");
-    } elsif (-x $ROUTE ) {
-	system("$ROUTE add $dest $gw");
-    } else {
-	warn "Cannot find a routing command!\n";
-    }
-}
-
-$f = new IO::File(">/proc/sys/net/ipv4/ip_forward") || 
-    die "Can't open sys forwarding file:$!\n";
-print $f "1\n";
-$f->close();
-
Index: fedkit/testbeds.example
===================================================================
--- fedkit/testbeds.example	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,78 +1,0 @@
-# Each testbed's parameters follow the bracketed testbed label.  The parameters
-# are bound to testbeds in the experiment when the label in brackets in this
-# file matches the string following tb-set-node-testbed command in the script. 
-# For example the nodes with tb-set-node-testbed $n "deter" will be allocated
-# to the first testbed below.
-
-[deter]
-# On DETER, when running on users, use localhost so that the remote execution
-# commands work
-OpsNode: localhost
-
-# Change this field in all the testbeds to be one you can access.  Ssh commands
-# to ops are issued as this user.
-User: faber
-
-# Make sure it starts with a dot.
-Domain: .isi.deterlab.net
-Project: emulab-ops
-ConnectorType: pc3000_tunnel
-ConnectorImage: FBSD61-TUNNEL2
-
-# These run on the slave testbeds.  They are passed to csh by emulab, hence the
-# >& redirections.  This file assumes DETER will be the master and these
-# haven't been run.
-SlaveNodeStartCmd: echo FEDDIR GWCONF >& /tmp/startup
-SlaveConnectorStartCmd: sudo -H /users/faber/fed-tun.pl -t .deter.emulab.net >& /tmp/bridge.log
-
-# Master testbed commands.  These are appropriate for DETER as master.
-MasterNodeStartCmd: sudo -H FEDDIR/make_hosts FEDDIR/hosts
-MasterConnectorStartCmd: sudo -H FEDDIR/fed-tun.pl -f GWCONF >& /tmp/bridge.log
-
-# These are passed through directly to the connector and client configurations,
-# with Domain (above) appended.
-FileServer: fs
-Boss: boss
-EventServer: event-server
-
-# This needs to be true on DETER
-TunnelCfg: true
-
-# End of DETER specifications
-[wail]
-OpsNode: users
-User: faber
-Domain: .schooner.wail.wisc.edu
-Project: Deter
-ConnectorType: pc
-ConnectorImage: FBSD61-TUNNEL2
-
-# These slave commands are appropriate for generic testbeds, which emulab and
-# WAIL are.  The -H on sudo is crucial when calling federate.sh
-SlaveNodeStartCmd: sudo -H /bin/sh FEDDIR/fed_bootstrap >& /tmp/federate
-SlaveConnectorStartCmd: sudo -H FEDDIR/fed-tun.pl -f GWCONF>& /tmp/bridge.log
-
-# These master commands are placeholders
-MasterNodeStartCmd: sudo -H /bin/sh FEDDIR/fed_bootstrap &> /tmp/mfederate 
-MasterConnectorStartCmd: sudo -H /users/faber/fed-tun.pl >& /tmp/bridge.log
-FileServer: fs
-Boss: boss
-EventServer: event-server
-TunnelCfg: false
-
-[emulab]
-OpsNode: users
-User: faber
-Domain: .emulab.net
-Project: DETER
-ConnectorType: pc
-ConnectorImage: FBSD61-TUNNEL2
-SlaveNodeStartCmd: sudo -H /bin/sh FEDDIR/fed_bootstrap >& /tmp/federate
-SlaveConnectorStartCmd: sudo -H FEDDIR/fed-tun.pl -f GWCONF>& /tmp/bridge.log
-MasterNodeStartCmd: sudo -H /bin/sh FEDDIR/fed_bootstrap &> /tmp/mfederate 
-MasterConnectorStartCmd: sudo -H /users/faber/fed-tun.pl >& /tmp/bridge.log
-FileServer: fs
-Boss: boss
-EventServer: event-server
-TunnelCfg: false
-
Index: fedkit/unsetup_bridge.pl
===================================================================
--- fedkit/unsetup_bridge.pl	(revision ccfc03d5d63de7063127dd4d609f7fe82e65f610)
+++ 	(revision )
@@ -1,85 +1,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-use gateway_lib;
-
-use Getopt::Long;
-
-use IO::File;
-
-my $tapno;
-my $addr;
-my $iface;
-my $fedkit_dir= "/usr/local/federation";
-my $perl = "/usr/bin/perl";
-my $peer;
-my $use_file;
-my %opts = (
-    'tapno=s' => \$tapno,
-    'addr=s' => \$addr,
-    'peer=s' => \$peer,
-    'use_file', \$use_file,
-);
-
-exit(20) unless GetOptions(%opts);
-gateway_lib::read_config(gateway_lib::config_filename(), \%opts)
-    if $use_file;
-
-die "Need an address\n" unless $addr;
-
-# Get the interface to reset
-my $f = new IO::File("/tmp/interface$tapno") ||
-    die "Cannot open interface file\n";
-
-while (<$f>) {
-    chomp;
-    $iface = $_;
-}
-$f->close( );
-
-print "iface is $iface\n";
-gateway_lib::configure_outgoing_iface($iface, $addr);
-
-exit(0);
-
-=pod
-
-=head1 NAME
-
-B<unsetup_bridge.pl> - Restore the given IP address to the interface bridged to
-the given tapno. 
-
-=head1 OPTIONS
-
-=over 8
-
-=item B<addr=>I<address>
-
-Address of the local interface to restore.
-
-=item B<tapno=>I<integer>
-
-The tap interface that generated the interface save file.
-
-=item B<use_file>
-
-If given read additional parameters from the file in
-/proj/I<project>/exp/I<experiment>/tmp/I<hostname>.gw/conf where those are the
-current testbed project and experiment and the hostname is before the first
-dot.  The file is option: value.
-
-
-=back
-
-=head1 SYNOPSIS
-
-B<unsetup_bridge.pl> restores a previously assigned IP address to an interface.
-That interface name was saved by B<setup_bridge.pl>, before it was removed for
-bridging.
-
-=head1 AUTHORS
-
-Ted Faber <faber@isi.edu>
-
-=cut
