X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=rpc%2Fdial.go;fp=rpc%2Fdial.go;h=f300370aba3f75eb7ff55b7fc9eb0be2c15d9871;hb=583a2695a3ddc9c98e0a03d9f1bad8df30afe887;hp=680cb87df39ae0c999ce789d5d53bb168ed64b80;hpb=304a68c565d58ae52dd39cf6e2d6ef52cada7d19;p=safcm%2Fsafcm.git diff --git a/rpc/dial.go b/rpc/dial.go index 680cb87..f300370 100644 --- a/rpc/dial.go +++ b/rpc/dial.go @@ -112,6 +112,17 @@ compat_stat() { compat_sha512sum() { sha512sum "$1" } +` + case "freebsd": + compat = ` +dir_stat='41777 0 0' +file_stat="100700 $(id -u) $(id -g)" +compat_stat() { + stat -f '%p %u %g' "$1" +} +compat_sha512sum() { + sha512 -q "$1" +} ` default: return fmt.Errorf("internal error: no support for %q", goos) @@ -278,6 +289,8 @@ func connGetGoos(stdin io.Writer, stdout *bufio.Reader) (string, error) { switch x { case "GNU/Linux": goos = "linux" + case "FreeBSD": + goos = "freebsd" default: return "", fmt.Errorf("unsupported OS %q (`uname -o`)", x) } @@ -298,7 +311,7 @@ func connGetGoarch(stdin io.Writer, stdout *bufio.Reader) (string, error) { // NOTE: Adapt cmd/safcm-remote/build.sh when adding new architectures var goarch string switch x { - case "x86_64": + case "x86_64", "amd64": goarch = "amd64" case "armv7l": goarch = "armv7l"