summaryrefslogtreecommitdiff
path: root/examples/source/mount-cgroups/up
blob: 5c62b473cbcc5b9e9b43def144a92054454a8130 (plain)
1
2
3
4
5
6
7
8
9
10
if { mkdir -p -m 0755 /sys/fs/cgroup }
if { s6-mount -wt tmpfs cgroup /sys/fs/cgroup }
redirfd -r 0 /proc/cgroups
pipeline { s6-tail -n +2 }
pipeline { s6-cut -d"\t" -f1 }
pipeline { s6-grep -vF -- devices }
forstdin -d"\n" -- i
import -u i
if { s6-mkdir /sys/fs/cgroup/${i} }
s6-mount -t cgroup -o ${i} -- cgroup /sys/fs/cgroup/${i}