Fix TTY implementation
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 25 Jun 2018 19:41:25 +0000 (15:41 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 25 Jun 2018 19:41:25 +0000 (15:41 -0400)
config.json
libremanage.py

index 9f3e0bd39503eeb2b2a082a2575b8bba8722757f..bed78a73e29a4311d1f00f55b1b1803a13036ccb 100644 (file)
@@ -3,7 +3,7 @@
                "web2": {
                        "manager": "myboard",
                        "tty": {
-                               "file": "/dev/ttyUSB0",
+                               "file": "/dev/ttyO0",
                                "baud": 115200
                        },
                        "power": {
index f28cd974fba16f90b3b83e3143bdec82b553a155..f72c598d8760c5f0076b19fc314e0edb1b78d091 100644 (file)
@@ -41,7 +41,7 @@ import subprocess
 
 def open_ssh(server, command):
     config = server["ssh"]
-    subprocess.run(["ssh", config["username"] + "@" + config["host"], "-p", str(config["port"]), command])
+    subprocess.run(["ssh", "-t", config["username"] + "@" + config["host"], "-p", str(config["port"]), command])
 
 def die_with_usage(message):
     print(message)
@@ -84,7 +84,7 @@ COMMANDS = {
 
         # TTY access (or keyboard if wired as such)
 
-        "tty": lambda s: open_ssh(s, "screen " + s["tty"]["file"] + str(s["tty"]["baud"])),
+        "tty": lambda s: open_ssh(s, "screen " + s["tty"]["file"] + " " + str(s["tty"]["baud"])),
 
         # SSH sanity tests