Browse Source

Invert CgroupDevicesEnabled condition

It feels better to test where it's required than listing everywhere it
is not required.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Vincent Demeester 9 years ago
parent
commit
72fefc0441
1 changed files with 2 additions and 2 deletions
  1. 2 2
      daemon/daemon.go

+ 2 - 2
daemon/daemon.go

@@ -550,8 +550,8 @@ func NewDaemon(config *Config, registryService registry.Service, containerdRemot
 
 	sysInfo := sysinfo.New(false)
 	// Check if Devices cgroup is mounted, it is hard requirement for container security,
-	// on Linux/FreeBSD.
-	if runtime.GOOS != "windows" && runtime.GOOS != "solaris" && !sysInfo.CgroupDevicesEnabled {
+	// on Linux.
+	if runtime.GOOS == "linux" && !sysInfo.CgroupDevicesEnabled {
 		return nil, fmt.Errorf("Devices cgroup isn't mounted")
 	}