Index: fedkit/splitter.pl
===================================================================
--- fedkit/splitter.pl	(revision 0e23fdbfc4d776684dc5a80e2b6e49382397eab7)
+++ fedkit/splitter.pl	(revision a835df7048f8a2593af1f0348b7a26f9d6b91692)
@@ -126,5 +126,5 @@
 # of the experiment determined using expinfo.  From that state, the experiment
 # is either created, modified or spapped in.  If everything succeeds, true is
-# returned.
+# returned.  If the global verbose is set progress messages are printed.
 sub start_segment {
     my($tb, $eid) = @_;			    # testbed and experiment ID
@@ -152,4 +152,5 @@
 
     # 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
@@ -159,8 +160,10 @@
     # 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;
     # 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) ||
@@ -168,4 +171,6 @@
 	&ship_scripts($host, $user, $proj_dir) || return 0;
 	&ship_configs($host, $user, "$tmpdir/$tb", $proj_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") || return 0;
@@ -175,4 +180,5 @@
     # 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.
@@ -181,6 +187,9 @@
 	&ship_scripts($host, $user, $proj_dir) || return 0;
 	&ship_configs($host, $user, "$tmpdir/$tb", $proj_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", 
@@ -192,6 +201,8 @@
     # the configuration files and scripts into the new experiment directories.
     if ($state eq "none") {
+	print "Creating $exp on $tb\n" if $verbose;
 	&ssh_cmd($user, $host, "/usr/testbed/bin/startexp -f -w -p " . 
 	    "$pid -e $eid $tclfile", "startexp") || return 0;
+	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) ||
@@ -200,4 +211,5 @@
 	&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") || return 0;
@@ -220,4 +232,5 @@
     my($pid) = $project{$tb};
 
+    print "Stopping $eid on $tb\n" if $verbose;
     &ssh_cmd($user, $host, "/usr/testbed/bin/swapexp -w $pid $eid out", 
 	"swapexp (out)") || return 0;
@@ -232,7 +245,9 @@
 				    # keep our changes to the parser minimal.
 # Argument processing.
-getopts('c:f:nd', \%opts);
+getopts('c:f:ndv', \%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_conf: $!\n";
@@ -266,4 +281,5 @@
 $tmpdir .= "/split$$";
 
+print "Temp files are in $tmpdir\n" if $verbose;
 # Create a workspace
 unless (-d "$tmpdir") {
@@ -410,4 +426,9 @@
 	$ddomain = ".$eid.$project{$dtb}$ddomain";
 
+	my($conf_file) = "$myname$sdomain.gw.conf";
+	# translate to lower case so the `hostname` hack for specifying
+	# configuration files works.
+	$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
@@ -424,6 +445,6 @@
 
 	# Write out the file
-	$gwconfig= new IO::File(">$tmpdir/$gateways/$myname$sdomain.gw.conf")|| 
-	    die "can't open $tmpdir/$gateways/$myname$sdomain.gw.conf: $!\n";
+	$gwconfig= new IO::File(">$tmpdir/$gateways/$conf_file")|| 
+	    die "can't open $tmpdir/$gateways/$conf_file: $!\n";
 
 	print $gwconfig "Active: $active\n";
@@ -521,4 +542,5 @@
 }
 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
