summaryrefslogtreecommitdiff
path: root/layout/rootfs/etc/s6-rc/source-base
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-01-30 14:44:04 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-01-30 14:44:04 +0000
commit61c8a693f00ce1c5141ec5f8339298f796f29707 (patch)
tree99316c6ebdca7a7b0f3448547aa029172f0979ab /layout/rootfs/etc/s6-rc/source-base
parent984b96ebcb50565898052a430d3422983c2d7df5 (diff)
downloadlh-bootstrap-61c8a693f00ce1c5141ec5f8339298f796f29707.tar.xz
Add network and syslogd
Diffstat (limited to 'layout/rootfs/etc/s6-rc/source-base')
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/default/contents7
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-eth0/dependencies2
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-eth0/down2
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-eth0/type1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-eth0/up2
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-lo/down2
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-route/dependencies2
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-route/down2
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-route/type1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/init-route/up1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/ok-lan/contents4
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/ok-lan/type1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/ok-local/contents6
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/ok-local/type1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/sshd-4-log/consumer-for1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/sshd-4-log/dependencies1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/sshd-4-log/pipeline-name1
-rwxr-xr-xlayout/rootfs/etc/s6-rc/source-base/sshd-4-log/run4
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/sshd-4-log/type1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/sshd-4/data/rules/ip4/10.0.0.2_32/allow0
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/sshd-4/dependencies2
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/sshd-4/notification-fd1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/sshd-4/producer-for1
-rwxr-xr-xlayout/rootfs/etc/s6-rc/source-base/sshd-4/run6
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/sshd-4/type1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/syslogd-log/consumer-for1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/syslogd-log/dependencies1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/syslogd-log/pipeline-name1
-rwxr-xr-xlayout/rootfs/etc/s6-rc/source-base/syslogd-log/run4
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/syslogd-log/type1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/syslogd/dependencies1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/syslogd/producer-for1
-rwxr-xr-xlayout/rootfs/etc/s6-rc/source-base/syslogd/run4
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/syslogd/type1
34 files changed, 63 insertions, 5 deletions
diff --git a/layout/rootfs/etc/s6-rc/source-base/default/contents b/layout/rootfs/etc/s6-rc/source-base/default/contents
index 0882c2e..359e9bc 100644
--- a/layout/rootfs/etc/s6-rc/source-base/default/contents
+++ b/layout/rootfs/etc/s6-rc/source-base/default/contents
@@ -1,5 +1,2 @@
-mdevd
-klogd-pipeline
-mount-disks
-mount-virtual
-fifodir-cleanup
+ok-local
+ok-lan
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-eth0/dependencies b/layout/rootfs/etc/s6-rc/source-base/init-eth0/dependencies
new file mode 100644
index 0000000..5e57eb3
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/init-eth0/dependencies
@@ -0,0 +1,2 @@
+init-sysctl
+mdevd
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-eth0/down b/layout/rootfs/etc/s6-rc/source-base/init-eth0/down
new file mode 100644
index 0000000..5404b98
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/init-eth0/down
@@ -0,0 +1,2 @@
+foreground { ip link set dev eth0 down }
+exit 0
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-eth0/type b/layout/rootfs/etc/s6-rc/source-base/init-eth0/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/init-eth0/type
@@ -0,0 +1 @@
+oneshot
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-eth0/up b/layout/rootfs/etc/s6-rc/source-base/init-eth0/up
new file mode 100644
index 0000000..a89a990
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/init-eth0/up
@@ -0,0 +1,2 @@
+if { ip addr add 10.0.0.1/24 dev eth0 }
+ip link set dev eth0 up
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-lo/down b/layout/rootfs/etc/s6-rc/source-base/init-lo/down
new file mode 100644
index 0000000..06de595
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/init-lo/down
@@ -0,0 +1,2 @@
+foreground { ip link set dev lo down }
+exit 0
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-route/dependencies b/layout/rootfs/etc/s6-rc/source-base/init-route/dependencies
new file mode 100644
index 0000000..9280d84
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/init-route/dependencies
@@ -0,0 +1,2 @@
+init-eth0
+mdevd
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-route/down b/layout/rootfs/etc/s6-rc/source-base/init-route/down
new file mode 100644
index 0000000..a498b23
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/init-route/down
@@ -0,0 +1,2 @@
+foreground { ip route del default }
+exit 0
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-route/type b/layout/rootfs/etc/s6-rc/source-base/init-route/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/init-route/type
@@ -0,0 +1 @@
+oneshot
diff --git a/layout/rootfs/etc/s6-rc/source-base/init-route/up b/layout/rootfs/etc/s6-rc/source-base/init-route/up
new file mode 100644
index 0000000..62a704d
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/init-route/up
@@ -0,0 +1 @@
+route add default gw 10.0.0.2
diff --git a/layout/rootfs/etc/s6-rc/source-base/ok-lan/contents b/layout/rootfs/etc/s6-rc/source-base/ok-lan/contents
new file mode 100644
index 0000000..11e9fd9
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/ok-lan/contents
@@ -0,0 +1,4 @@
+init-lo
+init-eth0
+init-route
+sshd-4
diff --git a/layout/rootfs/etc/s6-rc/source-base/ok-lan/type b/layout/rootfs/etc/s6-rc/source-base/ok-lan/type
new file mode 100644
index 0000000..757b422
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/ok-lan/type
@@ -0,0 +1 @@
+bundle
diff --git a/layout/rootfs/etc/s6-rc/source-base/ok-local/contents b/layout/rootfs/etc/s6-rc/source-base/ok-local/contents
new file mode 100644
index 0000000..2d907c7
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/ok-local/contents
@@ -0,0 +1,6 @@
+mdevd
+syslogd-pipeline
+klogd-pipeline
+mount-disks
+mount-virtual
+fifodir-cleanup
diff --git a/layout/rootfs/etc/s6-rc/source-base/ok-local/type b/layout/rootfs/etc/s6-rc/source-base/ok-local/type
new file mode 100644
index 0000000..757b422
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/ok-local/type
@@ -0,0 +1 @@
+bundle
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/consumer-for b/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/consumer-for
new file mode 100644
index 0000000..7d1730e
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/consumer-for
@@ -0,0 +1 @@
+sshd-4
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/dependencies b/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/dependencies
new file mode 100644
index 0000000..7c63988
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/dependencies
@@ -0,0 +1 @@
+mount-rwfs
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/pipeline-name b/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/pipeline-name
new file mode 100644
index 0000000..d46bed2
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/pipeline-name
@@ -0,0 +1 @@
+sshd-4-pipeline
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/run b/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/run
new file mode 100755
index 0000000..e40c2af
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/run
@@ -0,0 +1,4 @@
+#!/command/execlineb -P
+s6-setuidgid sshlog
+exec -c
+s6-log t s1000000 n20 /var/log/sshd-4
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/type b/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4-log/type
@@ -0,0 +1 @@
+longrun
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4/data/rules/ip4/10.0.0.2_32/allow b/layout/rootfs/etc/s6-rc/source-base/sshd-4/data/rules/ip4/10.0.0.2_32/allow
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4/data/rules/ip4/10.0.0.2_32/allow
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4/dependencies b/layout/rootfs/etc/s6-rc/source-base/sshd-4/dependencies
new file mode 100644
index 0000000..8aee9b6
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4/dependencies
@@ -0,0 +1,2 @@
+init-sysctl
+init-eth0
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4/notification-fd b/layout/rootfs/etc/s6-rc/source-base/sshd-4/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4/producer-for b/layout/rootfs/etc/s6-rc/source-base/sshd-4/producer-for
new file mode 100644
index 0000000..f103f82
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4/producer-for
@@ -0,0 +1 @@
+sshd-4-log
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4/run b/layout/rootfs/etc/s6-rc/source-base/sshd-4/run
new file mode 100755
index 0000000..7d8da1b
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4/run
@@ -0,0 +1,6 @@
+#!/command/execlineb -P
+fdmove -c 2 1
+fdmove 1 3
+s6-tcpserver4 -v 2 -1 -- 10.0.0.1 22
+s6-tcpserver-access -v 2 -DRHl0 -t 5000 -i data/rules --
+dropbear -i -K 60
diff --git a/layout/rootfs/etc/s6-rc/source-base/sshd-4/type b/layout/rootfs/etc/s6-rc/source-base/sshd-4/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/sshd-4/type
@@ -0,0 +1 @@
+longrun
diff --git a/layout/rootfs/etc/s6-rc/source-base/syslogd-log/consumer-for b/layout/rootfs/etc/s6-rc/source-base/syslogd-log/consumer-for
new file mode 100644
index 0000000..96c5cc7
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/syslogd-log/consumer-for
@@ -0,0 +1 @@
+syslogd
diff --git a/layout/rootfs/etc/s6-rc/source-base/syslogd-log/dependencies b/layout/rootfs/etc/s6-rc/source-base/syslogd-log/dependencies
new file mode 100644
index 0000000..7c63988
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/syslogd-log/dependencies
@@ -0,0 +1 @@
+mount-rwfs
diff --git a/layout/rootfs/etc/s6-rc/source-base/syslogd-log/pipeline-name b/layout/rootfs/etc/s6-rc/source-base/syslogd-log/pipeline-name
new file mode 100644
index 0000000..c8a925a
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/syslogd-log/pipeline-name
@@ -0,0 +1 @@
+syslogd-pipeline
diff --git a/layout/rootfs/etc/s6-rc/source-base/syslogd-log/run b/layout/rootfs/etc/s6-rc/source-base/syslogd-log/run
new file mode 100755
index 0000000..b04f309
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/syslogd-log/run
@@ -0,0 +1,4 @@
+#!/command/execlineb -P
+s6-setuidgid sysllog
+exec -c
+s6-log t s1000000 n20 /var/log/syslogd
diff --git a/layout/rootfs/etc/s6-rc/source-base/syslogd-log/type b/layout/rootfs/etc/s6-rc/source-base/syslogd-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/syslogd-log/type
@@ -0,0 +1 @@
+longrun
diff --git a/layout/rootfs/etc/s6-rc/source-base/syslogd/dependencies b/layout/rootfs/etc/s6-rc/source-base/syslogd/dependencies
new file mode 100644
index 0000000..c1ee812
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/syslogd/dependencies
@@ -0,0 +1 @@
+init-dev
diff --git a/layout/rootfs/etc/s6-rc/source-base/syslogd/producer-for b/layout/rootfs/etc/s6-rc/source-base/syslogd/producer-for
new file mode 100644
index 0000000..75d14f5
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/syslogd/producer-for
@@ -0,0 +1 @@
+syslogd-log
diff --git a/layout/rootfs/etc/s6-rc/source-base/syslogd/run b/layout/rootfs/etc/s6-rc/source-base/syslogd/run
new file mode 100755
index 0000000..1036f5e
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/syslogd/run
@@ -0,0 +1,4 @@
+#!/command/execlineb -P
+fdclose 0
+exec -c
+socklog
diff --git a/layout/rootfs/etc/s6-rc/source-base/syslogd/type b/layout/rootfs/etc/s6-rc/source-base/syslogd/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/syslogd/type
@@ -0,0 +1 @@
+longrun