Use s6-log's native readiness notification support.

Fixes #9
This commit is contained in:
genofire 2020-10-20 14:08:28 +02:00
parent d3f447dce4
commit 4696d140aa
2 changed files with 2 additions and 16 deletions

View File

@ -17,14 +17,7 @@ ifelse -n { install -d -o "${USER}" -g "${GROUP}" -m "${MODE}" "$DIR" } {
false
}
ifelse -n { fdmove 1 3 echo } {
foreground { fdmove -c 1 2 echo "bhyve-${NAME}-log: Failed to signal readiness." }
false
}
foreground { fdmove -c 1 2 echo "bhyve-${NAME}-log: Ready." }
fdmove -c 2 1
s6-envuidgid $USER
s6-log T $DIR
s6-log -d 3 T $DIR

View File

@ -17,14 +17,7 @@ ifelse -n { install -d -o "${USER}" -g "${GROUP}" -m "${MODE}" "$DIR" } {
false
}
ifelse -n { fdmove 1 3 echo } {
foreground { fdmove -c 1 2 echo "${NAME} log: Failed to signal readiness." }
false
}
foreground { fdmove -c 1 2 echo "${NAME} log: Ready." }
fdmove -c 2 1
s6-envuidgid $USER
s6-log T $DIR
s6-log -d 3 T $DIR