From 2d94aaae3f4ac48ba57f72bd701f8a75cebed675 Mon Sep 17 00:00:00 2001
From: Robert Ricci <ricci@cs.utah.edu>
Date: Thu, 16 Dec 2004 06:32:03 +0000
Subject: [PATCH] Ick. For things to work on a Stargate, we have to reboot the
 stargate after we flash the mote.

We can probably make this work (I hope), but this hack will have to
do for now.
---
 mote/tbuisp.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/mote/tbuisp.in b/mote/tbuisp.in
index 49c41904a6..64f791eb59 100755
--- a/mote/tbuisp.in
+++ b/mote/tbuisp.in
@@ -309,6 +309,15 @@ MOTE: foreach my $mote (@motes) {
 	$errors++;
 	warn "Failed to upload code to $mote";
     }
+
+    # XXX - We have to reboot stargates after loading the mote. Disgusting,
+    # there should be some better way
+    if ($upload_method eq "ssh") {
+	if (system("$SSHTB -host $host shutdown -r now")) {
+	    $errors++;
+	    warn "Failed to upload code to $mote";
+	}
+    }
 }
 
 if ($errors) {
-- 
GitLab