board/common: introduce conditions for bootstrap services

Some services launched at bootstrap must be possible to override per
product.  One such service is iitod, which manages the LEDs in Infix.

This change makes allows a product specific init script to clear the
led condtion, preventing Finit from lauching iitod.  Also, rename the
ixinit-done condition to match the nomenclature used already.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2024-11-08 14:30:04 +01:00
parent dc741bb567
commit 4e2458e18a
4 changed files with 10 additions and 3 deletions
@@ -35,7 +35,14 @@ if [ "$found" = false ]; then
note "No vendor/product-specific directory found, using built-in defaults."
fi
# Conditions for bootstrap services, this enables product specific
# init scripts to prevent select services from starting.
initctl -nbq cond set led
note "Calling runparts $PRODUCT_INIT/S[0-9]+.* start"
/usr/libexec/finit/runparts -bsp "$PRODUCT_INIT"
# Product specific init done.
initctl -nbq cond set product
exit 0
@@ -1,2 +1,2 @@
#!/bin/sh
exec initctl -bq cond set ixinit-done
exec initctl -bq cond set ixinit
+1 -1
View File
@@ -1,6 +1,6 @@
#set DEBUG=1
run name:bootstrap log:prio:user.notice norestart <usr/ixinit-done> \
run name:bootstrap log:prio:user.notice norestart <usr/ixinit> \
[S] /usr/libexec/confd/bootstrap \
-- Bootstrapping YANG datastore
+1 -1
View File
@@ -1 +1 @@
service [S0123456789] <!pid/syslogd> iitod -- LED daemon
service [S0123456789] <!usr/product,usr/led> iitod -- LED daemon