Index: fedd/fedd_client.py
===================================================================
--- fedd/fedd_client.py	(revision f4f4117545ada5ee8f261126922327b95a54f83b)
+++ fedd/fedd_client.py	(revision 9c166cf269d504c403503481e1640b70a7e84015)
@@ -123,4 +123,14 @@
 		type="string", help="Use this username instead of the uid")
 
+class fedd_split_opts(fedd_create_opts):
+    def __init__(self, access_keys, add_key_callback=None, 
+	    add_cert_callback=None):
+	fedd_create_opts.__init__(self, access_keys, add_key_callback,
+		add_cert_callback)
+	self.add_option('-t','--fedkit', action='store_true', dest='fedkit',
+		default=False,
+		help="get output suitable for federation kit install")
+
+
 class fedd_access_opts(fedd_create_opts):
     def __init__(self, access_keys, node_descs, add_key_callback=None, 
@@ -605,5 +615,5 @@
 	access_keys = []
 	# Process the options using the customized option parser defined above
-	parser = fedd_create_opts(access_keys, self.add_ssh_key,
+	parser = fedd_split_opts(access_keys, self.add_ssh_key,
 		self.add_x509_cert)
 
@@ -619,4 +629,5 @@
 
 	if opts.cert != None: cert = opts.cert
+	else: cert = None
 
 	if cert == None:
@@ -650,4 +661,5 @@
 		'description': { 'ns2description': exp_desc },
 		'master': opts.master,
+		'include_fedkit': opts.fedkit,
 		}
 
Index: fedd/fedd_experiment_control.py
===================================================================
--- fedd/fedd_experiment_control.py	(revision f4f4117545ada5ee8f261126922327b95a54f83b)
+++ fedd/fedd_experiment_control.py	(revision 9c166cf269d504c403503481e1640b70a7e84015)
@@ -45,7 +45,4 @@
     Thred safe.
     """
-    scripts = ["fed_bootstrap", "federate.sh", "smbmount.FreeBSD.pl",
-	"smbmount.Linux.pl", "make_hosts", "fed-tun.pl", "fed-tun.ucb.pl",
-	"fed_evrepeater", "rc.accounts.patch"]
     
     class thread_pool:
@@ -152,5 +149,4 @@
 	Intialize the various attributes, most from the config object
 	"""
-	self.scripts = fedd_experiment_control_local.scripts
 	self.thread_with_rv = fedd_experiment_control_local.pooled_thread
 	self.thread_pool = fedd_experiment_control_local.thread_pool
@@ -190,12 +186,11 @@
 	    self.state_filename = config.get("experiment_control", 
 		    "experiment_state_file")
-	    self.scripts_dir = config.get("experiment_control",
-		    "federation_script_dir")
 	    self.splitter_url = config.get("experiment_control", "splitter_url")
+	    self.fedkit = config.get("experiment_control", "fedkit")
 	else:
 	    self.debug = False
 	    self.state_filename = None
-	    self.scripts_dir = "/users/faber/testbed/federation"
 	    self.splitter_url = None
+	    self.fedkit = None
 
 	# XXX
@@ -214,10 +209,14 @@
 
 	self.def_expstart = \
-		"sudo -H /bin/sh FEDDIR/fed_bootstrap >& /tmp/federate";
-	self.def_mexpstart = "sudo -H FEDDIR/make_hosts FEDDIR/hosts";
+		"sudo -H /bin/sh /usr/local/federation/bin/federate.sh >& " +\
+		"/tmp/federate";
+	self.def_mexpstart = "sudo -H /usr/local/federation/bin/make_hosts " +\
+		"FEDDIR/hosts";
 	self.def_gwstart = \
-		"sudo -H FEDDIR/fed-tun.pl -f GWCONF>& /tmp/bridge.log";
+		"sudo -H /usr/local/federation/bin/fed-tun.pl -f GWCONF>& " +\
+		"/tmp/bridge.log";
 	self.def_mgwstart = \
-		"sudo -H FEDDIR/fed-tun.pl -f GWCONF >& /tmp/bridge.log";
+		"sudo -H /usr/local/federation/bin/fed-tun.pl -f GWCONF >& " +\
+		"/tmp/bridge.log";
 	self.def_gwimage = "FBSD61-TUNNEL2";
 	self.def_gwtype = "pc";
@@ -233,21 +232,5 @@
 			"Cannot read sshpubkey")
 
-	# Set the logging level to the value passed in.  The getattr slieght of
-	# hand finds the logging level constant corrersponding to the string.
-	# We're a little paranoid to avoid user mayhem.
-	if config.has_option("experiment_control", "log_level"):
-	    try:
-		level = int(getattr(logging, 
-		    config.get("experiment_control", "log_level").upper(),-1))
-
-		if  logging.DEBUG <= level <= logging.CRITICAL:
-		    self.log.setLevel(level)
-		else:
-		    self.log.error("Bad experiment_log value: %s" % \
-			    config.get("experiment_control", "log_level"))
-
-	    except ValueError:
-		self.log.error("Bad experiment_log value: %s" % \
-			config.experiment_log)
+	set_log_level(config, "experiment_control", self.log)
 
 	# Grab saved state.  OK to do this w/o locking because it's read only
@@ -256,10 +239,4 @@
 	if self.state_filename:
 	    self.read_state()
-
-	# Confirm federation scripts in the right place
-	for s in self.scripts:
-	    if not os.path.exists(self.scripts_dir + "/" + s):
-		raise service_error(service_error.server_config,
-			"%s/%s not in local script dir" % (self.scripts_dir, s))
 
 	# Dispatch tables
@@ -408,17 +385,4 @@
 	    return True
 
-    def ship_scripts(self, host, user, dest_dir):
-	"""
-	Copy the federation scripts (fedkit) to the a federant.
-	"""
-	if self.ssh_cmd(user, host, "mkdir -p %s" % dest_dir):
-	    for s in self.scripts:
-		if not self.scp_file("%s/%s" % (self.scripts_dir, s),
-			user, host, dest_dir):
-		    return False
-	    return True
-	else:
-	    return False
-
     def ship_configs(self, host, user, src_dir, dest_dir):
 	"""
@@ -520,6 +484,4 @@
 			"%s/%s" % (proj_dir, f)):
 		    return False
-	    if not self.ship_scripts(host, user, proj_dir):
-		return False
 	    if not self.ship_configs(host, user, "%s/%s" % (tmpdir, tb),
 		    proj_dir):
@@ -545,6 +507,4 @@
 			"%s/%s" % (proj_dir, f)):
 		    return False
-	    if not self.ship_scripts(host, user, proj_dir):
-		return False
 	    if not self.ship_configs(host, user, "%s/%s" % (tmpdir, tb),
 		    proj_dir):
@@ -593,6 +553,4 @@
 			"%s/%s" % (proj_dir, f)):
 		    return False
-	    if not self.ship_scripts(host, user, proj_dir):
-		return False
 	    if not self.ship_configs(host, user, "%s/%s" % (tmpdir, tb),
 		    proj_dir):
@@ -916,4 +874,5 @@
 		'description' : { 'ns2description': desc },
 		'master': master,
+		'include_fedkit': bool(self.fedkit)
 	    }
 
@@ -960,5 +919,5 @@
 	subsittuted line by line.
 	"""
-	def __init__(self, eid, tmpdir):
+	def __init__(self, eid, tmpdir, fedkit):
 	    self.begin_testbed = re.compile("^#\s+Begin\s+Testbed\s+\((\w+)\)")
 	    self.end_testbed = re.compile("^#\s+End\s+Testbed\s+\((\w+)\)")
@@ -978,4 +937,5 @@
 	    self.eid = eid
 	    self.tmpdir = tmpdir
+	    self.fedkit = fedkit
 
 	def __call__(self, line, master, allocated, tbparams):
@@ -1038,5 +998,4 @@
 			line = re.sub("GWSTART", gwstart, line)
 			line = re.sub("EXPSTART", expstart, line)
-		    # XXX: does `` embed without doing enything else?
 		    line = re.sub("GWCONF", "FEDDIR`hostname`.gw.conf", line)
 		    line = re.sub("PROJDIR", "/proj/%s/" % project, line)
@@ -1044,4 +1003,7 @@
 		    line = re.sub("FEDDIR", "/proj/%s/exp/%s/tmp/" % \
 			    (project, self.eid), line)
+		    if self.fedkit:
+			line = re.sub("FEDKIT", os.path.basename(self.fedkit),
+				line)
 		    print >>self.testbed_file, line
 		return True
@@ -1077,5 +1039,5 @@
     class gateways:
 	def __init__(self, eid, master, tmpdir, gw_pubkey,
-		gw_secretkey, copy_file):
+		gw_secretkey, copy_file, fedkit):
 	    self.begin_gateways = \
 		    re.compile("^#\s+Begin\s+gateways\s+\((\w+)\)")
@@ -1092,4 +1054,5 @@
 
 	    self.copy_file = copy_file
+	    self.fedkit = fedkit
 
 
@@ -1116,6 +1079,14 @@
 	    seer_control = "%s%s" % \
 		    (tbparams[gw].get('control', "control"), sdomain)
-	    remote_script_dir = "/proj/%s/exp/%s/tmp" % ( dproject, eid)
-	    local_script_dir = "/proj/%s/exp/%s/tmp" % ( sproject, eid)
+
+	    if self.fedkit:
+		remote_script_dir = "/usr/local/federation/bin"
+		local_script_dir = "/usr/local/federation/bin"
+	    else:
+		remote_script_dir = "/proj/%s/exp/%s/tmp" % ( dproject, eid)
+		local_script_dir = "/proj/%s/exp/%s/tmp" % ( sproject, eid)
+
+	    local_key_dir = "/proj/%s/exp/%s/tmp" % ( sproject, eid)
+	    remote_conf_dir = "/proj/%s/exp/%s/tmp" % ( dproject, eid)
 	    tunnel_cfg = tbparams[gw].get("tun", "false")
 
@@ -1153,8 +1124,8 @@
 	    print >>gwconfig, "LocalExperiment: %s/%s" % (sproject, eid)
 	    print >>gwconfig, "RemoteConfigFile: %s/%s" % \
-		    (remote_script_dir, remote_conf_file)
+		    (remote_conf_dir, remote_conf_file)
 	    print >>gwconfig, "Peer: %s%s" % (desthost, ddomain)
-	    print >>gwconfig, "Pubkeys: %s/%s" % (local_script_dir, pubkey)
-	    print >>gwconfig, "Privkeys: %s/%s" % (local_script_dir, privkey)
+	    print >>gwconfig, "Pubkeys: %s/%s" % (local_key_dir, pubkey)
+	    print >>gwconfig, "Privkeys: %s/%s" % (local_key_dir, privkey)
 	    gwconfig.close()
 
@@ -1454,9 +1425,17 @@
 	
 	if self.splitter_url:
+	    self.log.debug("Calling remote splitter at %s" % self.splitter_url)
 	    split_data = self.remote_splitter(self.splitter_url, file_content,
 		    master)
 	else:
 	    tclcmd = [self.tclsh, self.tcl_splitter, '-s', '-x', 
-		str(self.muxmax), '-m', master, pid, gid, eid, tclfile]
+		str(self.muxmax), '-m', master]
+
+	    if self.fedkit:
+		tclcmd.append('-k')
+
+	    tclcmd.extend([pid, gid, eid, tclfile])
+
+	    self.log.debug("running local splitter %s", " ".join(tclcmd))
 	    tclparser = Popen(tclcmd, stdout=PIPE)
 	    split_data = tclparser.stdout
@@ -1467,8 +1446,8 @@
 
 	# Objects to parse the splitter output (defined above)
-	parse_current_testbed = self.current_testbed(eid, tmpdir)
+	parse_current_testbed = self.current_testbed(eid, tmpdir, self.fedkit)
 	parse_allbeds = self.allbeds(self.get_access)
 	parse_gateways = self.gateways(eid, master, tmpdir,
-		gw_pubkey_base, gw_secretkey_base, self.copy_file)
+		gw_pubkey_base, gw_secretkey_base, self.copy_file, self.fedkit)
 	parse_vtopo = self.shunt_to_string("^#\s+Begin\s+Vtopo",
 		    "^#\s+End\s+Vtopo")
@@ -1523,4 +1502,6 @@
 	# Copy tarfiles and rpms needed at remote sites into a staging area
 	try:
+	    if self.fedkit:
+		parse_tarfiles.list.append(self.fedkit)
 	    for t in parse_tarfiles.list:
 		if not os.path.exists("%s/tarfiles" % tmpdir):
Index: fedd/fedd_split.py
===================================================================
--- fedd/fedd_split.py	(revision f4f4117545ada5ee8f261126922327b95a54f83b)
+++ fedd/fedd_split.py	(revision 9c166cf269d504c403503481e1640b70a7e84015)
@@ -35,5 +35,5 @@
     def emit(self, record): pass
 
-fl = logging.getLogger("fedd.experiment_control")
+fl = logging.getLogger("fedd.splitter")
 fl.addHandler(nullHandler())
 
@@ -46,13 +46,18 @@
 	    self.debug = config.getboolean("splitter", "debug")
 	    self.muxmax = config.getint("splitter", "muxmax", 3)
+	    self.tclsh = config.get("splitter", "tclsh", 
+		    "/usr/local/bin/otclsh")
+	    self.tcl_splitter = config.get("splitter", "tcl_splitter",
+		    "/usr/testbed/lib/ns2ir/parse.tcl")
 	else:
 	    self.debug = False
 	    self.muxmax = 3
+	    self.tclsh = "/usr/local/bin/otclsh"
+	    self.tcl_splitter = "/usr/testbed/lib/ns2ir/parse.tcl"
 
 	self.log = logging.getLogger("fedd.splitter")
-	self.tclsh = "/usr/local/bin/otclsh"
-	self.tcl_splitter = "/usr/testbed/lib/ns2ir/parse.tcl"
 	self.trace_file = sys.stderr
 
+	set_log_level(config, "splitter", self.log)
 	# Dispatch tables
 	self.soap_services = {\
@@ -116,7 +121,15 @@
 	    raise service_error(service_error.req, "No master testbed label")
 	
+	include_fedkit = req.get('include_fedkit', None)
+	if include_fedkit == None:
+	    raise service_error(service_error.req, 
+		    "No federation kit inclusion directive")
+	
 	
 	tclcmd = [self.tclsh, self.tcl_splitter, '-s', '-x', 
-	    str(self.muxmax), '-m', master, pid, gid, eid, tclfile]
+	    str(self.muxmax), '-m', master]
+	if include_fedkit: tclcmd.append('-k')
+	tclcmd.extend([pid, gid, eid, tclfile])
+	self.log.debug("Calling splitter %s" % " ".join(tclcmd))
 	tclparser = Popen(tclcmd, stdout=PIPE)
 
Index: fedd/fedd_types.xsd
===================================================================
--- fedd/fedd_types.xsd	(revision f4f4117545ada5ee8f261126922327b95a54f83b)
+++ fedd/fedd_types.xsd	(revision 9c166cf269d504c403503481e1640b70a7e84015)
@@ -480,4 +480,5 @@
       <xsd:element name="description" type="tns:experimentDescriptionType"/>
       <xsd:element name="master" type="xsd:string"/>
+      <xsd:element name="include_fedkit" type="xsd:bool"/>
     </xsd:sequence>
   </xsd:complexType>
Index: fedd/fedd_util.py
===================================================================
--- fedd/fedd_util.py	(revision f4f4117545ada5ee8f261126922327b95a54f83b)
+++ fedd/fedd_util.py	(revision 9c166cf269d504c403503481e1640b70a7e84015)
@@ -4,4 +4,5 @@
 import subprocess
 import tempfile
+import logging
 
 from M2Crypto import SSL, X509, EVP
@@ -394,2 +395,21 @@
 
     return handler
+
+def set_log_level(config, sect, log):
+    """ Set the logging level to the value passed in sect of config."""
+    # The getattr sleight of hand finds the logging level constant
+    # corrersponding to the string.  We're a little paranoid to avoid user
+    # mayhem.
+    if config.has_option(sect, "log_level"):
+	level_str = config.get(sect, "log_level")
+	try:
+	    level = int(getattr(logging, level_str.upper(), -1))
+
+	    if  logging.DEBUG <= level <= logging.CRITICAL:
+		log.setLevel(level)
+	    else:
+		log.error("Bad experiment_log value: %s" % level_str)
+
+	except ValueError:
+	    log.error("Bad experiment_log value: %s" % level_str)
+
