Re: Journey to s6-svscan as PID 1 on FreeBSD (almost there)

2021-04-08 Thread Dewayne Geraghty
On 9/04/2021 4:29 am, Crest wrote: > There is a cleaner solution. I prefer to set the init_path kernel env > var in /boot/loader.conf and prepend the s6 stage1 script to the normal > search path. That way the kernel starts my execline script as PID 1 and > if I mess it I just have to clear the var

Re: Journey to s6-svscan as PID 1 on FreeBSD (almost there)

2021-04-08 Thread Crest
On 08.04.21 15:15, Dewayne Geraghty wrote: First we started with the documented approach of appending to /etc/ttys "" "/usr/local/bin/s6-svscan /run/scan""" on Which worked nicely under FreeBSD's /sbin/init. Then we added to loader.conf an init_script which is invoked via /sbin/init. T

Re: Journey to s6-svscan as PID 1 on FreeBSD (almost there)

2021-04-08 Thread Laurent Bercot
Finally I sucked up the courage and defined in /boot/loader.conf init_exec=/root/bin/init_exec.sh which contains #!/usr/local/bin/execlineb -S0 redirfd -wnb 1 /m/fifo/catch_all redirfd -r - /dev/null fdmove -c 2 1 exec -c /sbin/s6/svscan -t 0 -s /s/scan And finally /sbin/s6-svscan runs as pid 1.