From a93b8b92e215ce1934cea364db1b68f099b902f3 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Mon, 27 Jan 2020 10:39:01 -0500 Subject: core-services/00-pseudofs.sh: mount cgroup v2 unified file system --- core-services/00-pseudofs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core-services/00-pseudofs.sh b/core-services/00-pseudofs.sh index 1ae7398..8fe1257 100644 --- a/core-services/00-pseudofs.sh +++ b/core-services/00-pseudofs.sh @@ -11,6 +11,10 @@ mountpoint -q /dev/shm || mount -o mode=1777,nosuid,nodev -n -t tmpfs shm /dev/s mountpoint -q /sys/kernel/security || mount -n -t securityfs securityfs /sys/kernel/security if [ -z "$VIRTUALIZATION" ]; then + # cgroup v1 mountpoint -q /sys/fs/cgroup || mount -o mode=0755 -t tmpfs cgroup /sys/fs/cgroup awk '$4 == 1 { system("mountpoint -q /sys/fs/cgroup/" $1 " || { mkdir -p /sys/fs/cgroup/" $1 " && mount -t cgroup -o " $1 " cgroup /sys/fs/cgroup/" $1 " ;}" ) }' /proc/cgroups + # cgroup v2 + mkdir -p /sys/fs/cgroup/unified + mountpoint -q /sys/fs/cgroup/unified || mount -t cgroup2 -o nsdelegate cgroup2 /sys/fs/cgroup/unified fi -- cgit 1.4.1