blob: 2052b98b900123195a031d0b62e14083871c1f7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!@shebangdir@/execlineb -P
# ISC license.
# https://kernel.org/doc/html/latest/admin-guide/cgroup-v1/
fdmove -c 2 1
define MOUNTPOINT "/sys/fs/cgroup"
if { mkdir -p -m755 -- ${MOUNTPOINT} }
if { mount -n -t tmpfs cgroup_root ${MOUNTPOINT} }
pipeline { cut -d"\t" -f1,4 -- /proc/cgroups }
pipeline { grep -F -- 1 }
pipeline { cut -d"\t" -f1 }
forstdin -pE SUBSYS
if { mkdir -p -- ${MOUNTPOINT}/${SUBSYS} }
mount -n -t cgroup -o ${SUBSYS} cgroup ${MOUNTPOINT}/${SUBSYS}
|