#!/bin/execlineb -P cd / umask 022 fdclose 0 if { s6-echo "* init stage 1" } #s6-envdir /etc/s6-init/env #strace -f # Stage 0 actually mounted a bunch of stuff for us # finish off console fdclose 1 fdclose 2 s6-envdir /etc/s6-init/env if { s6-mount -wt tmpfs -o mode=0755,size=67108864 tmpfs /run } if { /bin/mkdir /run/service } # /service symlinks /run/service if { s6-hiercopy /etc/s6-stage1 /service } redirfd -r 0 /dev/null redirfd -wnb 1 /service/uncaught-logs/fifo # (black magic: doesn't block) fdmove -c 2 1 # Fork off stage 2, will start once catch-all logger is active background { s6-setsid redirfd -w 1 /service/uncaught-logs/fifo # Blocks until logger is ready /sbin/stage2 } unexport ! s6-svscan -t0 /service