X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=57bbb1d002807bf2bda36598a309046853bc4e3c;hp=d410162462428cf398a9078c0f8c99819a266475;hb=02313252e36e309776829312ab87e9a489e6572f;hpb=6156b4779584b4bf1dc973ce988a34a1bcae1db3 diff --git a/configure.ac b/configure.ac index d41016246..57bbb1d00 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AC_PREREQ([2.64]) AC_INIT([elogind], - [226.2], + [226.5], [https://github.com/elogind/elogind/issues], [elogind], [https://github.com/elogind/elogind]) @@ -113,10 +113,17 @@ fi # ------------------------------------------------------------------------------ # Find running cgroup controller with_cgroupctrl= -AS_IF( [test -f /proc/self/cgroup], - [with_cgroupctrl=`grep "^1:name=" /proc/self/cgroup | cut -d ':' -f 2`]) +AS_IF( [test -f /proc/self/cgroup], [ + # If the init system is a cgroup controler, it will be position 1. + # Secondary controllers, like cgmanager, do not work. + with_cgroupctrl=`grep "^1:name=" /proc/self/cgroup | cut -d ':' -f 2` + AS_IF( [test -z "$with_cgroupctrl"], [ + # Try to be our own cgroup controller + with_cgroupctrl="name=elogind" + ]) +]) AS_IF( [test -z "$with_cgroupctrl"], - [with_cgroupctrl="name=elogind"]) + AC_MSG_ERROR([No running cgroup controller found])) # ------------------------------------------------------------------------------