From 0a3eedd4c9d2bed208a85cd7aefae050a821eb6b Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Sat, 14 Dec 2013 15:29:08 +1000 Subject: [PATCH] when sharing a /var/lib/docker dir with more than one distribution, an existing lxc-start-unconfined softlink may point to a non-existant path, following that link (as Stat does) will cause the daemon to fail to start --- runtime.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime.go b/runtime.go index a2669343ce..3268892d56 100644 --- a/runtime.go +++ b/runtime.go @@ -868,7 +868,7 @@ func linkLxcStart(root string) error { } targetPath := path.Join(root, "lxc-start-unconfined") - if _, err := os.Stat(targetPath); err != nil && !os.IsNotExist(err) { + if _, err := os.Lstat(targetPath); err != nil && !os.IsNotExist(err) { return err } else if err == nil { if err := os.Remove(targetPath); err != nil {