dotcloud/docker — pull request #5657 by tianon (2014-05-07 15:51:24+00:00)
Title: Add "Should-Start" cgroupfs-mount and cgroup-lite to sysvinit-debian init script

It's fine to list both here because "Should-Start" is a loose binding (ie, if the listed service exists, it'll be started first, but otherwise, this one will start without it).

This fixes a fun race condition that @paultag noticed, where cgroupfs-mount has a block of code that does basically `mountpount /sys/fs/cgroup || mount ... /sys/fs/cgroup`, but docker contains the same block, so during the time of that `||`, they could both see that it's not a mountpoint, and then both mount tmpfs on it (which is a very hard race to hit, and is mostly harmless, but irritating and wrong nonetheless).

For the curious about "Should-Start", see also https://wiki.debian.org/LSBInitScripts#line-79.