From e18d6958b2470a2e68cc637945ccf3a1dae5c0a2 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 5 May 2025 06:29:50 +0000 Subject: Update examples Signed-off-by: Laurent Bercot --- examples/source/mount-cgroups-sub/up | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 examples/source/mount-cgroups-sub/up (limited to 'examples/source/mount-cgroups-sub/up') diff --git a/examples/source/mount-cgroups-sub/up b/examples/source/mount-cgroups-sub/up new file mode 100644 index 0000000..5f7888d --- /dev/null +++ b/examples/source/mount-cgroups-sub/up @@ -0,0 +1,10 @@ +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 +importas -u i i +if { s6-mkdir -p /sys/fs/cgroup/${i} } +foreground { s6-mount -t cgroup -o ${i} -- cgroup /sys/fs/cgroup/${i} } +importas -u ? ? +eltest $? -le 1 -- cgit v1.3.1