diff --git a/cube/cube-agent/pkg/linux_amd64/github.com/Badangel/logex.a b/cube/cube-agent/pkg/linux_amd64/github.com/Badangel/logex.a new file mode 100644 index 0000000000000000000000000000000000000000..50e3af8e8a51d7b810a194e5652920e475c4b24b Binary files /dev/null and b/cube/cube-agent/pkg/linux_amd64/github.com/Badangel/logex.a differ diff --git a/cube/cube-agent/pkg/linux_amd64/github.com/Badangel/pipeline.a b/cube/cube-agent/pkg/linux_amd64/github.com/Badangel/pipeline.a new file mode 100644 index 0000000000000000000000000000000000000000..4a417af9d9088bbbbd81c7a104407359aff06445 Binary files /dev/null and b/cube/cube-agent/pkg/linux_amd64/github.com/Badangel/pipeline.a differ diff --git a/cube/cube-agent/pkg/linux_amd64/github.com/docopt/docopt-go.a b/cube/cube-agent/pkg/linux_amd64/github.com/docopt/docopt-go.a new file mode 100644 index 0000000000000000000000000000000000000000..7cf6706d15ea479fdb51355657682143d7639c6b Binary files /dev/null and b/cube/cube-agent/pkg/linux_amd64/github.com/docopt/docopt-go.a differ diff --git a/cube/cube-agent/pkg/linux_amd64/github.com/mipearson/rfw.a b/cube/cube-agent/pkg/linux_amd64/github.com/mipearson/rfw.a new file mode 100644 index 0000000000000000000000000000000000000000..40edc0b6035c190f6c86faa0707e2a9f65602623 Binary files /dev/null and b/cube/cube-agent/pkg/linux_amd64/github.com/mipearson/rfw.a differ diff --git a/cube/cube-agent/src/agent/work.go b/cube/cube-agent/src/agent/work.go index 992882c6698335a221a0ba802222d051de629f07..8f7229322ce046297270daee6108c9abb5ab4309 100644 --- a/cube/cube-agent/src/agent/work.go +++ b/cube/cube-agent/src/agent/work.go @@ -834,9 +834,17 @@ func GetFileName(source string) (fileName string) { } func checkMd5(file string, fileMd5 string) (err error) { - md5Cmd := fmt.Sprintf("./scripts/md5_checker %s %s", file, fileMd5) + cmd := fmt.Sprintf("md5sum %s | awk '{print $1}'", file) + stdout, _, _ := pipeline.Run(exec.Command("/bin/sh", "-c", cmd)) + real_md5 := stdout.String() + cmd = fmt.Sprintf("cat %s | awk '{print $1}'", fileMd5) + stdout, _, _ = pipeline.Run(exec.Command("/bin/sh", "-c", cmd)) + given_md5 := stdout.String() - _, _, err = pipeline.Run(exec.Command("/bin/sh", "-c", md5Cmd)) + if real_md5 != given_md5 { + logex.Warningf("checkMd5 failed real_md5[%s] given_md5[%s]", real_md5, given_md5) + err = errors.New("checkMd5 failed") + } return } diff --git a/cube/cube-agent/src/github.com/Badangel/logex b/cube/cube-agent/src/github.com/Badangel/logex new file mode 160000 index 0000000000000000000000000000000000000000..bea1165feb7bc0cfb4c4dd4d0e96de4a927ef33d --- /dev/null +++ b/cube/cube-agent/src/github.com/Badangel/logex @@ -0,0 +1 @@ +Subproject commit bea1165feb7bc0cfb4c4dd4d0e96de4a927ef33d diff --git a/cube/cube-agent/src/github.com/Badangel/pipeline b/cube/cube-agent/src/github.com/Badangel/pipeline new file mode 160000 index 0000000000000000000000000000000000000000..83bee10329eb396c8911d57bd05fc0a1992dd717 --- /dev/null +++ b/cube/cube-agent/src/github.com/Badangel/pipeline @@ -0,0 +1 @@ +Subproject commit 83bee10329eb396c8911d57bd05fc0a1992dd717 diff --git a/cube/cube-agent/src/github.com/docopt/docopt-go b/cube/cube-agent/src/github.com/docopt/docopt-go new file mode 160000 index 0000000000000000000000000000000000000000..ee0de3bc6815ee19d4a46c7eb90f829db0e014b1 --- /dev/null +++ b/cube/cube-agent/src/github.com/docopt/docopt-go @@ -0,0 +1 @@ +Subproject commit ee0de3bc6815ee19d4a46c7eb90f829db0e014b1 diff --git a/cube/cube-agent/src/github.com/mipearson/rfw b/cube/cube-agent/src/github.com/mipearson/rfw new file mode 160000 index 0000000000000000000000000000000000000000..6f0a6f3266ba1058df9ef0c94cda1cecd2e62852 --- /dev/null +++ b/cube/cube-agent/src/github.com/mipearson/rfw @@ -0,0 +1 @@ +Subproject commit 6f0a6f3266ba1058df9ef0c94cda1cecd2e62852 diff --git a/cube/cube-transfer/pkg/linux_amd64/github.com/Badangel/logex.a b/cube/cube-transfer/pkg/linux_amd64/github.com/Badangel/logex.a new file mode 100644 index 0000000000000000000000000000000000000000..09182138c70a0af1e17826c32a8887395305b67d Binary files /dev/null and b/cube/cube-transfer/pkg/linux_amd64/github.com/Badangel/logex.a differ diff --git a/cube/cube-transfer/pkg/linux_amd64/github.com/docopt/docopt-go.a b/cube/cube-transfer/pkg/linux_amd64/github.com/docopt/docopt-go.a new file mode 100644 index 0000000000000000000000000000000000000000..1840492c933250cd8940c7d41bead1c6afd57e8e Binary files /dev/null and b/cube/cube-transfer/pkg/linux_amd64/github.com/docopt/docopt-go.a differ diff --git a/cube/cube-transfer/pkg/linux_amd64/github.com/mipearson/rfw.a b/cube/cube-transfer/pkg/linux_amd64/github.com/mipearson/rfw.a new file mode 100644 index 0000000000000000000000000000000000000000..a8946c7317ecd0e806c36e0532d7781eb92ecedd Binary files /dev/null and b/cube/cube-transfer/pkg/linux_amd64/github.com/mipearson/rfw.a differ diff --git a/cube/cube-transfer/src/github.com/Badangel/logex b/cube/cube-transfer/src/github.com/Badangel/logex new file mode 160000 index 0000000000000000000000000000000000000000..bea1165feb7bc0cfb4c4dd4d0e96de4a927ef33d --- /dev/null +++ b/cube/cube-transfer/src/github.com/Badangel/logex @@ -0,0 +1 @@ +Subproject commit bea1165feb7bc0cfb4c4dd4d0e96de4a927ef33d diff --git a/cube/cube-transfer/src/github.com/docopt/docopt-go b/cube/cube-transfer/src/github.com/docopt/docopt-go new file mode 160000 index 0000000000000000000000000000000000000000..ee0de3bc6815ee19d4a46c7eb90f829db0e014b1 --- /dev/null +++ b/cube/cube-transfer/src/github.com/docopt/docopt-go @@ -0,0 +1 @@ +Subproject commit ee0de3bc6815ee19d4a46c7eb90f829db0e014b1 diff --git a/cube/cube-transfer/src/github.com/mipearson/rfw b/cube/cube-transfer/src/github.com/mipearson/rfw new file mode 160000 index 0000000000000000000000000000000000000000..6f0a6f3266ba1058df9ef0c94cda1cecd2e62852 --- /dev/null +++ b/cube/cube-transfer/src/github.com/mipearson/rfw @@ -0,0 +1 @@ +Subproject commit 6f0a6f3266ba1058df9ef0c94cda1cecd2e62852