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