summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2017-03-10 08:33:22 +0100
committerSven Eden <yamakuzure@gmx.net>2017-03-14 10:23:22 +0100
commit34c7fcb14d705141c71b5b63a2f044a51ffbd92b (patch)
tree6e54cf6831207e49b9199e5d34e9384f8133a865 /configure.ac
parent6156b4779584b4bf1dc973ce988a34a1bcae1db3 (diff)
Add mounting of a name=elogind cgroup if no init controller is found.
This is done for systems, which init systems are no cgroup controllers. One example is runit on Void Linux.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index d41016246..1c5e25f48 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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]))
# ------------------------------------------------------------------------------