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>
This commit is contained in:
parent
75109b32db
commit
72fefc0441
1 changed files with 2 additions and 2 deletions
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue