diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-07-31 08:28:21 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-08-04 14:34:53 +0200 |
commit | f3dca9e3c3373a5817582d4b583077b8f9358604 (patch) | |
tree | ea76ef30c91cf194ec7b47f59df44d452f26e10b /tools/meson-get-cg-controller.sh | |
parent | f3061b4c6efa8275466c56f291eca43d36178213 (diff) |
General: Update build system to upstream support of meson+ninja.
Upstream thinks, that the auto tools are too 'legacy', or that they
are at least no longer fitting.
We follow, as the classic auto tools files have been removed, so no
other choice here...
Diffstat (limited to 'tools/meson-get-cg-controller.sh')
-rwxr-xr-x | tools/meson-get-cg-controller.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/meson-get-cg-controller.sh b/tools/meson-get-cg-controller.sh new file mode 100755 index 000000000..98ba37a7f --- /dev/null +++ b/tools/meson-get-cg-controller.sh @@ -0,0 +1,18 @@ +#!/bin/sh -eu + +if test -f /proc/self/cgroup; then + # 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 | \ + sed -n 's/.*=//p' | sed -e 's/:.*$//') + if test -z "$with_cgroupctrl"; then + # Try to be our own cgroup controller + with_cgroupctrl="elogind" + fi +else + # 'auto' but no cgroup fs is a problem. + with_cgroupctrl="" +fi + +echo "$with_cgroupctrl" +exit 0 |