X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=rpc%2Fdial.go;h=db25cb7b6e823ab5287e039304a31a46c5483ab3;hb=77197f737073b551e216e55e30c41ebac53a0219;hp=36092793e005e06991a64fe440b97ca74fac6a88;hpb=f2f2bc47e8729548f3c10117f7f008b547c4afc5;p=safcm%2Fsafcm.git diff --git a/rpc/dial.go b/rpc/dial.go index 3609279..db25cb7 100644 --- a/rpc/dial.go +++ b/rpc/dial.go @@ -32,11 +32,15 @@ import ( "ruderich.org/simon/safcm/remote" ) -func (c *Conn) DialSSH(remote string) error { +func (c *Conn) DialSSH(user, host string) error { if c.events == nil { return fmt.Errorf("cannot reuse Conn") } + remote := host + if user != "" { + remote = user + "@" + host + } c.debugf("DialSSH: connecting to %q", remote) opts := "-eu" @@ -148,7 +152,7 @@ f() { chmod 0700 "$x" fi - exec "$x" + exec "$x" sync } f `, path) @@ -276,6 +280,8 @@ func connGetGoarch(stdin io.Writer, stdout *bufio.Reader) (string, error) { switch x { case "x86_64": goarch = "amd64" + case "armv7l": + goarch = "armv7l" default: return "", fmt.Errorf("unsupported arch %q (`uname -m`)", x) }