X-Git-Url: https://ruderich.org/simon/gitweb/?p=safcm%2Fsafcm.git;a=blobdiff_plain;f=rpc%2Fdial.go;h=ef280191ef57b23ca8f03461a97af206e23ecc67;hp=f300370aba3f75eb7ff55b7fc9eb0be2c15d9871;hb=7c4e5d64e25acec7209a54a15836b4481c450416;hpb=9d5d7ffc1eaa0e2d8a8d5bcd62118fead34cb6d0 diff --git a/rpc/dial.go b/rpc/dial.go index f300370..ef28019 100644 --- a/rpc/dial.go +++ b/rpc/dial.go @@ -113,7 +113,7 @@ compat_sha512sum() { sha512sum "$1" } ` - case "freebsd": + case "freebsd", "openbsd": compat = ` dir_stat='41777 0 0' file_stat="100700 $(id -u) $(id -g)" @@ -274,7 +274,7 @@ f } func connGetGoos(stdin io.Writer, stdout *bufio.Reader) (string, error) { - _, err := fmt.Fprintln(stdin, "uname -o") + _, err := fmt.Fprintln(stdin, "uname") if err != nil { return "", err } @@ -287,12 +287,14 @@ func connGetGoos(stdin io.Writer, stdout *bufio.Reader) (string, error) { // NOTE: Adapt helper uploading in dialSSH() when adding new systems var goos string switch x { - case "GNU/Linux": + case "Linux": goos = "linux" case "FreeBSD": goos = "freebsd" + case "OpenBSD": + goos = "openbsd" default: - return "", fmt.Errorf("unsupported OS %q (`uname -o`)", x) + return "", fmt.Errorf("unsupported OS %q (`uname`)", x) } return goos, nil }