From 438607ecc321a0256b7597cf278d4356632aac2f Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 27 Nov 2013 16:49:40 -0700 Subject: [PATCH] Add proper dockerinit path support for distros that use FHS 2.3 --- utils/utils.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/utils.go b/utils/utils.go index cfdc73bb2e..87a99cd7a2 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -279,9 +279,16 @@ func DockerInitPath(localCopy string) string { var possibleInits = []string{ localCopy, filepath.Join(filepath.Dir(selfPath), "dockerinit"), - // "/usr/libexec includes internal binaries that are not intended to be executed directly by users or shell scripts. Applications may use a single subdirectory under /usr/libexec." + + // FHS 3.0 Draft: "/usr/libexec includes internal binaries that are not intended to be executed directly by users or shell scripts. Applications may use a single subdirectory under /usr/libexec." + // http://www.linuxbase.org/betaspecs/fhs/fhs.html#usrlibexec "/usr/libexec/docker/dockerinit", "/usr/local/libexec/docker/dockerinit", + + // FHS 2.3: "/usr/lib includes object files, libraries, and internal binaries that are not intended to be executed directly by users or shell scripts." + // http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#USRLIBLIBRARIESFORPROGRAMMINGANDPA + "/usr/lib/docker/dockerinit", + "/usr/local/lib/docker/dockerinit", } for _, dockerInit := range possibleInits { path, err := exec.LookPath(dockerInit)