Kaynağa Gözat

Remove uncalled configureSysInit

Signed-off-by: John Howard <jhoward@microsoft.com>
John Howard 9 yıl önce
ebeveyn
işleme
2648655a4a
2 değiştirilmiş dosya ile 0 ekleme ve 32 silme
  1. 0 26
      daemon/daemon_unix.go
  2. 0 6
      daemon/daemon_windows.go

+ 0 - 26
daemon/daemon_unix.go

@@ -13,16 +13,13 @@ import (
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
 	"github.com/docker/docker/daemon/graphdriver"
 	"github.com/docker/docker/daemon/graphdriver"
-	"github.com/docker/docker/dockerversion"
 	derr "github.com/docker/docker/errors"
 	derr "github.com/docker/docker/errors"
 	pblkiodev "github.com/docker/docker/pkg/blkiodev"
 	pblkiodev "github.com/docker/docker/pkg/blkiodev"
-	"github.com/docker/docker/pkg/fileutils"
 	"github.com/docker/docker/pkg/idtools"
 	"github.com/docker/docker/pkg/idtools"
 	"github.com/docker/docker/pkg/parsers"
 	"github.com/docker/docker/pkg/parsers"
 	"github.com/docker/docker/pkg/parsers/kernel"
 	"github.com/docker/docker/pkg/parsers/kernel"
 	"github.com/docker/docker/pkg/sysinfo"
 	"github.com/docker/docker/pkg/sysinfo"
 	"github.com/docker/docker/runconfig"
 	"github.com/docker/docker/runconfig"
-	"github.com/docker/docker/utils"
 	"github.com/docker/docker/volume"
 	"github.com/docker/docker/volume"
 	"github.com/docker/libnetwork"
 	"github.com/docker/libnetwork"
 	nwconfig "github.com/docker/libnetwork/config"
 	nwconfig "github.com/docker/libnetwork/config"
@@ -300,29 +297,6 @@ func migrateIfDownlevel(driver graphdriver.Driver, root string) error {
 	return migrateIfAufs(driver, root)
 	return migrateIfAufs(driver, root)
 }
 }
 
 
-func configureSysInit(config *Config, rootUID, rootGID int) (string, error) {
-	localCopy := filepath.Join(config.Root, "init", fmt.Sprintf("dockerinit-%s", dockerversion.Version))
-	sysInitPath := utils.DockerInitPath(localCopy)
-	if sysInitPath == "" {
-		return "", fmt.Errorf("Could not locate dockerinit: This usually means docker was built incorrectly. See https://docs.docker.com/project/set-up-dev-env/ for official build instructions.")
-	}
-
-	if sysInitPath != localCopy {
-		// When we find a suitable dockerinit binary (even if it's our local binary), we copy it into config.Root at localCopy for future use (so that the original can go away without that being a problem, for example during a package upgrade).
-		if err := idtools.MkdirAs(filepath.Dir(localCopy), 0700, rootUID, rootGID); err != nil && !os.IsExist(err) {
-			return "", err
-		}
-		if _, err := fileutils.CopyFile(sysInitPath, localCopy); err != nil {
-			return "", err
-		}
-		if err := os.Chmod(localCopy, 0700); err != nil {
-			return "", err
-		}
-		sysInitPath = localCopy
-	}
-	return sysInitPath, nil
-}
-
 func isBridgeNetworkDisabled(config *Config) bool {
 func isBridgeNetworkDisabled(config *Config) bool {
 	return config.Bridge.Iface == disableNetworkBridge
 	return config.Bridge.Iface == disableNetworkBridge
 }
 }

+ 0 - 6
daemon/daemon_windows.go

@@ -2,7 +2,6 @@ package daemon
 
 
 import (
 import (
 	"fmt"
 	"fmt"
-	"os"
 
 
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
 	"github.com/docker/docker/daemon/graphdriver"
 	"github.com/docker/docker/daemon/graphdriver"
@@ -91,11 +90,6 @@ func migrateIfDownlevel(driver graphdriver.Driver, root string) error {
 	return nil
 	return nil
 }
 }
 
 
-func configureSysInit(config *Config, rootUID, rootGID int) (string, error) {
-	// TODO Windows.
-	return os.Getenv("TEMP"), nil
-}
-
 func isBridgeNetworkDisabled(config *Config) bool {
 func isBridgeNetworkDisabled(config *Config) bool {
 	return false
 	return false
 }
 }