Check if socket is identical to weave socket after trimming prefix.
This allows us to run 'weave proxy -H /var/run/weave/weave.sock'
This commit is contained in:
1 parent
912e8fe119
commit
153ed601be
1 file changed
+2
-2
+2
-2
@@ -611,10 +611,10 @@ func (proxy *Proxy) symlink(unixAddrs []string) (err error) {
|
||||
binds := []string{"/var/run/weave:/var/run/weave"}
|
||||
froms := []string{}
|
||||
for _, addr := range unixAddrs {
|
||||
if addr == weaveSockUnix {
|
||||
from := strings.TrimPrefix(addr, "unix://")
|
||||
if from == weaveSock {
|
||||
continue
|
||||
}
|
||||
from := strings.TrimPrefix(addr, "unix://")
|
||||
dir := filepath.Dir(from)
|
||||
binds = append(binds, dir+":"+filepath.Join("/host", dir))
|
||||
froms = append(froms, filepath.Join("/host", from))
|
||||
|
||||
Reference in new issue
Block a user