From 96bc377a8d293cf786722ebb0ff89a81d63e43ed Mon Sep 17 00:00:00 2001 From: Alexander Morozov <lk4d4@docker.com> Date: Wed, 8 Jul 2015 14:12:49 -0700 Subject: [PATCH] Check dockerinit only if lxc driver is used This allow you to run dynamically linked docker without compiling dockerinit. Signed-off-by: Alexander Morozov <lk4d4@docker.com> --- daemon/daemon.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index 549a1c188e..39e467a8d5 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -698,9 +698,13 @@ func NewDaemon(config *Config, registryService *registry.Service) (daemon *Daemo d.containerGraph = graph - sysInitPath, err := configureSysInit(config) - if err != nil { - return nil, err + var sysInitPath string + if config.ExecDriver == "lxc" { + initPath, err := configureSysInit(config) + if err != nil { + return nil, err + } + sysInitPath = initPath } sysInfo := sysinfo.New(false)