Revert "Automatically symlink /var/run/*.sock sockets to /var/run/weave/*.sock"
This commit is contained in:
1 parent
1432bd7a81
commit
3bae4b0d93
5 files changed
+11
-46
No files matched your search
+3
-5
@@ -8,7 +8,6 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -284,16 +283,15 @@ func (proxy *Proxy) listen(protoAndAddr string) (net.Listener, string, error) {
|
||||
}
|
||||
|
||||
case "unix":
|
||||
localAddr := filepath.Join("/host", addr)
|
||||
// remove socket from last invocation
|
||||
if err := os.Remove(localAddr); err != nil && !os.IsNotExist(err) {
|
||||
if err := os.Remove(addr); err != nil && !os.IsNotExist(err) {
|
||||
return nil, "", err
|
||||
}
|
||||
listener, err = net.Listen(proto, localAddr)
|
||||
listener, err = net.Listen(proto, addr)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
if err = copyOwnerAndPermissions(dockerSock, localAddr); err != nil {
|
||||
if err = copyOwnerAndPermissions(dockerSock, addr); err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user