1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #30111 from darrenstahlmsft/DependsConDrv

Windows: Add service dependency ConDrv
This commit is contained in:
Sebastiaan van Stijn 2017-01-26 12:49:05 +01:00 committed by GitHub
commit fe5f49685d

View file

@ -13,6 +13,7 @@ import (
"unsafe" "unsafe"
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker/pkg/system"
"github.com/spf13/pflag" "github.com/spf13/pflag"
"golang.org/x/sys/windows" "golang.org/x/sys/windows"
"golang.org/x/sys/windows/svc" "golang.org/x/sys/windows/svc"
@ -165,10 +166,20 @@ func registerService() error {
return err return err
} }
defer m.Disconnect() defer m.Disconnect()
depends := []string{}
// This dependency is required on build 14393 (RS1)
// it is added to the platform in newer builds
if system.GetOSVersion().Build == 14393 {
depends = append(depends, "ConDrv")
}
c := mgr.Config{ c := mgr.Config{
ServiceType: windows.SERVICE_WIN32_OWN_PROCESS, ServiceType: windows.SERVICE_WIN32_OWN_PROCESS,
StartType: mgr.StartAutomatic, StartType: mgr.StartAutomatic,
ErrorControl: mgr.ErrorNormal, ErrorControl: mgr.ErrorNormal,
Dependencies: depends,
DisplayName: "Docker Engine", DisplayName: "Docker Engine",
} }