Merge pull request #4160 from crosbymichael/cleanup-exec-drivers

Cleanup some statements from exec driver work
This commit is contained in:
Victor Vieux 2014-02-14 17:32:01 -08:00
commit a7ecc3ea11
3 changed files with 1 additions and 22 deletions

View file

@ -100,7 +100,6 @@ func changeUser(args *execdriver.InitArgs) error {
}
func setupCapabilities(args *execdriver.InitArgs) error {
if args.Privileged {
return nil
}

View file

@ -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

View file

@ -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