Index: fedkit/splitter.pl
===================================================================
--- fedkit/splitter.pl	(revision 527321c85cd2df8650f17c5c3980ede0dbb60320)
+++ fedkit/splitter.pl	(revision 5f1cd41a78b4f4e1238f050b5e4baefd1a9dde6c)
@@ -48,5 +48,5 @@
 sub parse_config {
     my($file, $href) = @_;
-    my($fh) = new IO::File($file);
+    my $fh = new IO::File($file);
 	
     unless ($fh) {
@@ -59,5 +59,5 @@
 	chomp;
 	/^([^:]+):\s*(.*)/ && do {
-	    my($key) = $1; 
+	    my $key = $1; 
 
 	    $key =~ tr/A-Z/a-z/;
@@ -176,5 +176,5 @@
 sub ship_scripts {
     my($host, $user, $dest_dir) = @_;	    # Where, who, where remotely
-    my($s);
+    my $s;
 
     &ssh_cmd($user, $host, "mkdir -p $dest_dir");
@@ -191,5 +191,4 @@
     my($host, $user, $src_dir, $dest_dir) = @_;	    # Where, who, where remotely
     my($d, $f);
-
 
     $d = IO::Dir->new($src_dir) || return 0;
@@ -421,5 +420,5 @@
 else {
     # Read a hash of per-testbed parameters from the local configurations.
-    my($conf) = new IO::File($tb_config) || 
+    my $conf = new IO::File($tb_config) || 
 	die "can't read testbed configutions from $tb_config: $!\n";
     while (<$conf>) {
@@ -450,5 +449,5 @@
 
 # Open a pipe to the splitter program and start it parsing the experiments
-my($pipe) = new IO::Pipe;
+my $pipe = new IO::Pipe;
 # NB no more -p call on parse call.
 $pipe->reader("$tclsh $tcl_splitter -s -m $master  $pid $gid $eid $tcl") || 
@@ -461,4 +460,5 @@
 				# 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
@@ -486,5 +486,6 @@
 	    $destfile = "$tmpdir/$ctb/$eid.$ctb.tcl";
 
-	    open(FILE, ">$destfile") || die "Cannot open $destfile:$!\n";
+	    $desthandle = new IO::File(">$destfile") || 
+		die "Cannot open $destfile:$!\n";
 	}
 	else { 
@@ -499,5 +500,5 @@
 	# Simple syntax check and close out this experiment's tcl description
 	die "Mismatched testbed markers ($1, $ctb)\n" unless ($1 eq $ctb);
-	close(FILE);
+	$desthandle->close();
 	$destfile = $ctb = "";
 	next;
@@ -547,10 +548,11 @@
     /^#\s+Begin\s+hostnames/ && do {
 	$destfile = "$tmpdir/hostnames";
-	open(FILE, ">$destfile") || die "Can't open $destfile:$!\n";
+	$desthandle = new IO::File(">$destfile") || 
+	    die "Can't open $destfile:$!\n";
 	next;
     };
     # end of the hostnames list.
     /^#\s+End\s+hostnames/ && do {
-	close(FILE);
+	$desthandle->close();
 	$destfile = "";
 	next;
@@ -600,5 +602,5 @@
 
 	# Write out the file
-	my($gwconfig) = new IO::File(">$tmpdir/$gateways/$conf_file")|| 
+	my $gwconfig = new IO::File(">$tmpdir/$gateways/$conf_file")|| 
 	    die "can't open $tmpdir/$gateways/$conf_file: $!\n";
 
@@ -668,5 +670,5 @@
     s#EID#$eid#g;
     s#FEDDIR#/proj/$project/exp/$eid/tmp/#g;
-    print FILE;
+    print $desthandle $_;
 }
 $pipe->close();
@@ -730,7 +732,11 @@
 tb-set-node-testbed command, added to the parser.
 
-The testbed labels 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.
+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
@@ -765,9 +771,9 @@
 =head2 Configuration File
 
-The configuration file is a simple attribute-value pair 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.
+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:
@@ -854,5 +860,6 @@
 =item domain
 
-The domain of nodes in this testbed (including the ops host).
+The domain of nodes in this testbed (including the ops host).  This parameter
+should always start with a period.
 
 =item project
@@ -892,8 +899,101 @@
 The disk image to be loaded on a gateway node on this testbed.
 
+=item filesystem node
+
+The node in the master testbed from which filesystems are mounted.
+
+=item boss node
+
+The node in the master testbed that controls the testbed.
+
+=item tunnel configuration
+
+True if the connector needs to do DETER federation.  This parameter will
+probably be removed.
+
 =back
 
 The parsing of the testbeds is extremely simple.  Colons separate each
 field and there is n provision for escaping them at this time.
+
+=head2 New Testbeds File Format
+
+The testbeds file has ben revamped to make it more human readable.  The
+parameters are now named and specified on separate lines 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
+
+The user under which to make requests to this testbed.  The user running
+B<splitter.pl> must be able to authenicate as this user under L<ssh(1)> to this
+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
+
+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
+
+The start command to run on experimental nodes when this testbed is used as a
+slave.  In all the start commands the string FEDDIR will be replaced by the
+local experiment's federation scripts directory and the string GWCONF replaced
+by the gatway configuration file.
+
+=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 experiment start.
+
+=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
+experiment start.
+
+=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
+experiment start.
+
+=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
+
 
 =head1 ENVIRONMENT
