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 60ee49325491d65680290ba3e491d54938910318
parent f3ee52741969f9bec5152a8e5a5a494f74d42691
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Fri,  4 Nov 2022 05:11:45 +0100

s6-svscanboot script copied and modified from chimney

Diffstat:
Minstall | 33+++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+), 0 deletions(-)

diff --git a/install b/install @@ -51,6 +51,39 @@ $qc/s6-svscan -t 0 EOF "$cmd/s6-chmod" 755 "$dst/init/init" +# s6-svscanboot {{{1 +"$cmd/s6-cat" >"$dst/init/scripts/s6-svscanboot" <<EOF || exit $? +#!$sm_dst_package/command/execlineb -P +# make sure we have sane environment first +$qc/redirfd -w 2 /dev/console +$qc/redirfd -w 1 /dev/console +$qc/redirfd -r 0 /dev/null +$qc/export PATH "/command:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + +$qc/execline-umask 022 +$qc/if { printf "%s: " "Starting S6" } +$qc/if { date } +#foreground { kldload tmpfs.ko } +# we don't seem to have simple check to see if /run is mounted specifically, +# so this will have to do +$qc/if { mount -a -t tmpfs } +$qc/if { + $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/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 +EOF + # populate-run {{{1 "$cmd/s6-cat" >"$dst/init/scripts/populate-run" <<EOF || exit $? #!$sm_dst_package/command/execlineb -P