ci / quality (push) Successful in 40s
ci / badges (push) Skipped
ci / mcdc (pull_request) Successful in 17s
ci / qemu-tools (pull_request) Successful in 47s
ci / test (pull_request) Successful in 19s
ci / bench (pull_request) Successful in 8s
ci / patches-apply (pull_request) Successful in 21s
ci / test (push) Successful in 17s
ci / prune-artifacts (pull_request) Skipped
ci / kernel-build (pull_request) Skipped
ci / quality (pull_request) Successful in 39s
ci / badges (pull_request) Skipped
ci / mcdc (push) Successful in 19s
ci / bench (push) Successful in 9s
ci / patches-apply (push) Successful in 22s
ci / qemu-tools (push) Successful in 46s
ci / prune-artifacts (push) Skipped
ci / kernel-build (push) Skipped
flare-edge#348 moves the panel's warden-modbus to S21modbus and warden-automation to S22automation, right after S20linkmount, so a held relay closes about 9 s sooner at boot. An automation's device command goes through warden-modbus (flare-edge#331), so modbus starts first. The rig's init starts the same daemons in the panel's S-number order and listed automation before modbus (S93, S94); it now matches the panel. init-daemon-order-test.sh reads the start loop and pins the order; it fails on the old list. Wired into CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01441BzdGcvQmXkiN2qDjfZg
38 lines
1.2 KiB
Bash
Executable File
38 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# The rig's /sbin/init starts the Warden daemons in the panel's S-number
|
|
# order (flare-edge#348): warden-modbus (S21modbus) before warden-automation
|
|
# (S22automation), since an automation's device command goes through
|
|
# warden-modbus, and both before the other app backends and flared. Reads
|
|
# the daemon list from the init script's own start loop.
|
|
set -uo pipefail
|
|
|
|
HERE="$(cd "$(dirname "$0")" && pwd)"
|
|
INIT="$HERE/../rootfs/sbin/init"
|
|
FAIL=0
|
|
|
|
order=$(awk '
|
|
/^for d in \/usr\/bin\/warden-/ { on = 1 }
|
|
on {
|
|
last = ($0 ~ /; do$/)
|
|
for (i = 1; i <= NF; i++) if ($i ~ /^\/usr\/bin\/warden-/) { w = $i; sub(/;$/, "", w); print w }
|
|
if (last) exit
|
|
}' "$INIT")
|
|
|
|
want="/usr/bin/warden-modbus
|
|
/usr/bin/warden-automation
|
|
/usr/bin/warden-ai
|
|
/usr/bin/warden-mikrotik
|
|
/usr/bin/warden-asic
|
|
/usr/bin/warden-starlink
|
|
/usr/bin/warden-stratum
|
|
/usr/bin/warden-flared"
|
|
|
|
if [ "$order" = "$want" ]; then
|
|
echo "PASS: rig init starts the daemons in the panel's S-number order"
|
|
else
|
|
echo "FAIL: rig init daemon order differs from the panel's S-number order"
|
|
diff <(printf '%s\n' "$want") <(printf '%s\n' "$order")
|
|
FAIL=1
|
|
fi
|
|
exit "$FAIL"
|