X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=rpc%2Fdial.go;h=40ac7f60712dacbe1070c0a04e91c6332b4ae5bf;hb=023e863fbd9c6cf5bebd18e19c05ae9e60fbbe21;hp=36092793e005e06991a64fe440b97ca74fac6a88;hpb=f2f2bc47e8729548f3c10117f7f008b547c4afc5;p=safcm%2Fsafcm.git diff --git a/rpc/dial.go b/rpc/dial.go index 3609279..40ac7f6 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" @@ -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) }