blob: d37d7a060cf46ac1f8e7062072268195f80c89c5 [file] [log] [blame]
Patrick Williamsd849ec72016-08-17 14:59:38 -05001From 12fd6388a033ab5ec9b3a7b144c4976031e6aa52 Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Fri, 20 Nov 2015 10:02:09 +0000
4Subject: [PATCH] disable sha1sum startup
5
6Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
7---
8 utils/utils.go | 18 +-----------------
9 1 file changed, 1 insertion(+), 17 deletions(-)
10
11diff --git a/utils/utils.go b/utils/utils.go
12index a17ab9d..3fc514a 100644
13--- a/utils/utils.go
14+++ b/utils/utils.go
15@@ -2,8 +2,6 @@ package utils
16
17 import (
18 "bufio"
19- "crypto/sha1"
20- "encoding/hex"
21 "fmt"
22 "io"
23 "io/ioutil"
24@@ -42,20 +40,6 @@ func SelfPath() string {
25 return path
26 }
27
28-func dockerInitSha1(target string) string {
29- f, err := os.Open(target)
30- if err != nil {
31- return ""
32- }
33- defer f.Close()
34- h := sha1.New()
35- _, err = io.Copy(h, f)
36- if err != nil {
37- return ""
38- }
39- return hex.EncodeToString(h.Sum(nil))
40-}
41-
42 func isValidDockerInitPath(target string, selfPath string) bool { // target and selfPath should be absolute (InitPath and SelfPath already do this)
43 if target == "" {
44 return false
45@@ -77,7 +61,7 @@ func isValidDockerInitPath(target string, selfPath string) bool { // target and
46 }
47 return os.SameFile(targetFileInfo, selfPathFileInfo)
48 }
49- return dockerversion.INITSHA1 != "" && dockerInitSha1(target) == dockerversion.INITSHA1
50+ return true
51 }
52
53 // DockerInitPath figures out the path of our dockerinit (which may be SelfPath())
54--
551.9.1
56