From 12fd6388a033ab5ec9b3a7b144c4976031e6aa52 Mon Sep 17 00:00:00 2001 From: Bogdan Purcareata Date: Fri, 20 Nov 2015 10:02:09 +0000 Subject: [PATCH] disable sha1sum startup Signed-off-by: Bogdan Purcareata --- utils/utils.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/utils/utils.go b/utils/utils.go index a17ab9d..3fc514a 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -2,8 +2,6 @@ package utils import ( "bufio" - "crypto/sha1" - "encoding/hex" "fmt" "io" "io/ioutil" @@ -42,20 +40,6 @@ func SelfPath() string { return path } -func dockerInitSha1(target string) string { - f, err := os.Open(target) - if err != nil { - return "" - } - defer f.Close() - h := sha1.New() - _, err = io.Copy(h, f) - if err != nil { - return "" - } - return hex.EncodeToString(h.Sum(nil)) -} - func isValidDockerInitPath(target string, selfPath string) bool { // target and selfPath should be absolute (InitPath and SelfPath already do this) if target == "" { return false @@ -77,7 +61,7 @@ func isValidDockerInitPath(target string, selfPath string) bool { // target and } return os.SameFile(targetFileInfo, selfPathFileInfo) } - return dockerversion.INITSHA1 != "" && dockerInitSha1(target) == dockerversion.INITSHA1 + return true } // DockerInitPath figures out the path of our dockerinit (which may be SelfPath()) -- 1.9.1