commit aacabbe88edc410207d52b1b31c4d33359fd849a parent 60ee49325491d65680290ba3e491d54938910318 Author: Jan Pobříslo <ccx@te2000.cz> Date: Mon, 7 Nov 2022 23:11:52 +0100 Add readiness pipeline to s6-svscanboot. Check for existence of /run/service and s6-rc in case of restart. Diffstat:
M | install | | | 20 | ++++++++++++-------- |
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/install b/install @@ -68,17 +68,21 @@ $qc/if { date } # so this will have to do $qc/if { mount -a -t tmpfs } $qc/if { + $qc/if -Xnt { $qc/s6-test -d /run/service/.s6-svscan } $q_all/init/scripts/populate-run } -#$qc/background -#{ -# $qc/s6-setsid -- -# $qc/fdmove -c 2 1 -# $q_all/init/scripts/rc.init -#} -#$qc/unexport ! +$qc/pipeline -w +{ + $qc/foreground { head -n 1 } + $qc/s6-setsid -- + $qc/redirfd -r 0 /dev/null + $qc/if -Xnt { $qc/s6-test -f /run/s6-rc/state } + $q_all/init/scripts/rc.init +} +$qc/fdmove -c 1 3 +$qc/fdmove -c 2 1 +$qc/unexport ! $qc/cd /run/service -$qc/redirfd -w 3 /run/s6_ready $qc/redirfd -wnb 1 /run/service/s6-svscan-log/fifo $qc/fdmove -c 2 1 $qc/s6-svscan -t0 -d3 /run/service