core-system-init-freebsd

core-system init submodule, FreeBSD version
git clone https://ccx.te2000.cz/git/core-system-init-freebsd
Log | Files | Refs

commit 48c6f5a771eae2bab44752b247c1ca470149ceb7
parent af5edc758833808ea3744e1bdbbec1c71456c756
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Tue, 15 Nov 2022 00:07:16 +0100

Log to catch-all logger, pass down runlevel, retry s6-rc on timeout.

Diffstat:
Minstall | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/install b/install @@ -46,7 +46,7 @@ $qc/pipeline -w $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 + $q_all/init/scripts/rc.init ok-all } $qc/fdmove -c 3 1 $qc/fdmove -c 1 2 @@ -79,7 +79,10 @@ EOF # rc.init {{{1 "$cmd/s6-cat" >"$dst/init/scripts/rc.init" <<EOF || exit $? #!$sm_dst_package/command/execlineb -S1 -$qc/export TERM "screen" +#$qc/export TERM "screen" +# write startup logs to logger instead of console +$qc/redirfd -w 1 /run/service/s6-svscan-log/fifo +$qc/fdmove -c 1 2 $qc/foreground { $qc/s6-echo "* Starting s6-rc from "$q_all/s6-rc-db } $qc/if { $qc/s6-rc-init -d -c $q_all/s6-rc-db /run/service } $q_all/init/scripts/runlevel \$1 @@ -108,6 +111,9 @@ export TERM "linux" # The requested runlevel is in "\$1" but currently ignored. -$qc/s6-rc -v 2 -t 600000 -- change ok-all +$qc/if -Xnt { $qc/s6-rc -v 2 -t 600000 -- change \$1 } +$qc/foreground { $qc/s6-echo "* System startup failure: retry once" } +$qc/foreground { sleep 0.1 } +$qc/s6-rc -v 2 -t 300000 -- change \$1 EOF "$cmd/s6-chmod" 755 "$dst/init/scripts/runlevel" || exit $?