aboutsummaryrefslogtreecommitdiffstats
path: root/examples/source-router/mount-cgroups-sub/up
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-01-23 06:49:25 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-01-23 06:49:25 +0000
commit1aa3bc74170f10a4285827efa2748d1d6c2e4613 (patch)
tree3fc6b79944f119dddf85a1cf8758cfbbab607cbe /examples/source-router/mount-cgroups-sub/up
parent3c61b2916c56bfa8d3ce7a6a5480eb93c2ed1470 (diff)
downloads6-rc-1aa3bc74170f10a4285827efa2748d1d6c2e4613.tar.gz
New example batch of service definitions
Diffstat (limited to 'examples/source-router/mount-cgroups-sub/up')
-rw-r--r--examples/source-router/mount-cgroups-sub/up10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/source-router/mount-cgroups-sub/up b/examples/source-router/mount-cgroups-sub/up
new file mode 100644
index 0000000..5f7888d
--- /dev/null
+++ b/examples/source-router/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