summaryrefslogtreecommitdiff
path: root/layout/rootfs/etc/init
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-05-04 00:10:26 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-05-04 00:10:26 +0000
commit7bb2006007c1996f33758e41db070252d4d3607f (patch)
tree3dc03d4f6a8867742961a3dea9ecc96c52d00a10 /layout/rootfs/etc/init
parent1202c964c4e91083a3c60b41b9c11e220bfa759d (diff)
downloadlh-bootstrap-7bb2006007c1996f33758e41db070252d4d3607f.tar.xz
Make a lean and mean version, as a basis for filling an initramfs
Diffstat (limited to 'layout/rootfs/etc/init')
-rwxr-xr-x[l---------]layout/rootfs/etc/init22
1 files changed, 21 insertions, 1 deletions
diff --git a/layout/rootfs/etc/init b/layout/rootfs/etc/init
index 8f4a706..619561d 120000..100755
--- a/layout/rootfs/etc/init
+++ b/layout/rootfs/etc/init
@@ -1 +1,21 @@
-s6-linux-init/init \ No newline at end of file
+#!/command/execlineb -P
+
+/command/export PATH /command:/bin
+/command/cd /
+s6-setsid -qb --
+umask 022
+
+s6-envdir -I -- /etc/s6-linux-init/current/env
+redirfd -r 0 /dev/null
+redirfd -wnb 1 /run/service/s6-svscan-log/fifo
+background
+{
+ s6-setsid --
+ redirfd -w 1 /run/service/s6-svscan-log/fifo
+ fdmove -c 2 1
+ /etc/s6-linux-init/current/rc.init
+}
+unexport !
+cd /run/service
+fdmove -c 2 1
+s6-svscan -st0