3 if test -f /proc/self/cgroup; then
4 # If the init system is a cgroup controler, it will be position 1.
5 # Secondary controllers, like cgmanager, do not work.
6 with_cgroupctrl=$(grep "^1:name=" /proc/self/cgroup | \
7 sed -n 's/.*=//p' | sed -e 's/:.*$//')
8 if test -z "$with_cgroupctrl"; then
9 # Try to be our own cgroup controller
10 with_cgroupctrl="elogind"
13 # 'auto' but no cgroup fs is a problem.
17 echo "$with_cgroupctrl"