From 9e3da87a3a6fea21194ceb9dbd30a39d043a48a4 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Fri, 14 Feb 2014 17:28:50 -0800 Subject: [PATCH] Cleanup some statements from exec driver work Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- execdriver/lxc/init.go | 1 - runtime.go | 14 -------------- sysinit/sysinit.go | 8 +------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/execdriver/lxc/init.go b/execdriver/lxc/init.go index 1ed0606631..e138915212 100644 --- a/execdriver/lxc/init.go +++ b/execdriver/lxc/init.go @@ -100,7 +100,6 @@ func changeUser(args *execdriver.InitArgs) error { } func setupCapabilities(args *execdriver.InitArgs) error { - if args.Privileged { return nil } diff --git a/runtime.go b/runtime.go index 872808d941..eed28f92ab 100644 --- a/runtime.go +++ b/runtime.go @@ -7,7 +7,6 @@ import ( "github.com/dotcloud/docker/dockerversion" "github.com/dotcloud/docker/engine" "github.com/dotcloud/docker/execdriver" - "github.com/dotcloud/docker/execdriver/chroot" "github.com/dotcloud/docker/execdriver/lxc" "github.com/dotcloud/docker/graphdriver" "github.com/dotcloud/docker/graphdriver/aufs" @@ -704,19 +703,6 @@ func NewRuntimeFromDirectory(config *DaemonConfig, eng *engine.Engine) (*Runtime sysInfo := sysinfo.New(false) - /* - temporarilly disabled. - */ - if false { - var ed execdriver.Driver - if driver := os.Getenv("EXEC_DRIVER"); driver == "lxc" { - ed, err = lxc.NewDriver(config.Root, sysInfo.AppArmor) - } else { - ed, err = chroot.NewDriver() - } - if ed != nil { - } - } ed, err := lxc.NewDriver(config.Root, sysInfo.AppArmor) if err != nil { return nil, err diff --git a/sysinit/sysinit.go b/sysinit/sysinit.go index dcf0eddf56..b02cf027aa 100644 --- a/sysinit/sysinit.go +++ b/sysinit/sysinit.go @@ -27,18 +27,12 @@ func setupEnv(args *execdriver.InitArgs) { func executeProgram(args *execdriver.InitArgs) error { setupEnv(args) + dockerInitFct, err := execdriver.GetInitFunc(args.Driver) if err != nil { panic(err) } return dockerInitFct(args) - - if args.Driver == "lxc" { - // Will never reach - } else if args.Driver == "chroot" { - } - - return nil } // Sys Init code