add acs48 to conmux

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@470 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/conmux/drivers/reboot-acs48 b/conmux/drivers/reboot-acs48
new file mode 100755
index 0000000..dbd829b
--- /dev/null
+++ b/conmux/drivers/reboot-acs48
@@ -0,0 +1,39 @@
+#! /usr/bin/expect --
+#
+# Reboot a machine connected to an ACS48 terminal server which is appropriately
+# configured to use power management equipment.  Assumes that ^P is power menu
+# hotkey (this is the default).
+#
+# Copyright 2006 Google Inc.
+# Author:  sqazi@google.com (Salman Qazi)
+#
+set machine [lindex $argv 0]
+set ts_addr [lindex $argv 1]
+spawn ssh root:$machine@$ts_addr
+sleep 5
+set timeout 30
+expect {
+   "Enter your option :"   {
+      send "4\r"
+      expect {
+         "Enter session PID or \'all\':" {
+	     send "all\r"
+	  }
+      }
+   }
+}
+expect {
+    "All sessions killed."          {
+      send \020
+      expect {
+        "Please choose an option:"  {
+	    send "5\r"
+	    expect {
+	      "Outlet turned on."    {send "\r~.\r"}
+	    }
+	}
+      }
+
+    }
+}
+