From 72fefc0441d57b59f27bebdb144e0e35c0c63a0d Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Thu, 26 May 2016 13:08:53 +0200 Subject: [PATCH] Invert CgroupDevicesEnabled condition It feels better to test where it's required than listing everywhere it is not required. Signed-off-by: Vincent Demeester --- daemon/daemon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index 02ea115c73..f247a3f6da 100644 --- a/daemon/daemon.go +++ b/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") }