From cdf99a6c762c799eb1c71385391813f804096328 Mon Sep 17 00:00:00 2001 From: Hendrik Jäger Date: Sun, 22 May 2022 15:36:47 +0200 Subject: fix: wait until s6-svscan is ready --- files/usr/local/bin/s6-svscanboot | 11 +++++++++-- files/usr/local/bin/s6-svscanboot.buster | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'files/usr/local') diff --git a/files/usr/local/bin/s6-svscanboot b/files/usr/local/bin/s6-svscanboot index 7a5f549..f2b6e35 100644 --- a/files/usr/local/bin/s6-svscanboot +++ b/files/usr/local/bin/s6-svscanboot @@ -29,5 +29,12 @@ if { chmod 0755 ${1}/s6-svscan-log/run } redirfd -r 0 /dev/null redirfd -wnb 1 ${1}/s6-svscan-log/fifo fdmove -c 2 1 -s6-svscan -- ${1} - +piperw 3 4 +background { + fdclose 3 + s6-setsid + s6-svscan -d4 -- ${1} +} +fdclose 4 +fdmove 1 3 +head -n 1 diff --git a/files/usr/local/bin/s6-svscanboot.buster b/files/usr/local/bin/s6-svscanboot.buster index ef6de1b..28aa5a1 100644 --- a/files/usr/local/bin/s6-svscanboot.buster +++ b/files/usr/local/bin/s6-svscanboot.buster @@ -29,5 +29,12 @@ if { chmod 0755 ${1}/s6-svscan-log/run } redirfd -r 0 /dev/null redirfd -wnb 1 ${1}/s6-svscan-log/fifo fdmove -c 2 1 -s6-svscan -- ${1} - +piperw 3 4 +background { + fdclose 3 + s6-setsid + s6-svscan -d4 -- ${1} +} +fdclose 4 +fdmove 1 3 +head -n 1 -- cgit v1.2.3