board/common: Address review feedback on hw-wait

- Fix various shellcheck warnings
- Use idiomatic formatting of multiline finit stanzas
This commit is contained in:
Tobias Waldekranz
2024-11-22 15:00:40 +01:00
parent d7c7c33e72
commit 06721a17b3
2 changed files with 10 additions and 10 deletions
@@ -1,9 +1,9 @@
# Extend finit's default udevadm settle synchronization for situations
# where device are very slow to probe (see #685)
run nowarn if:udevd cgroup.init [S] <service/udevd/ready> log \
/usr/libexec/infix/hw-wait -- Probing hardware
run nowarn if:udevd cgroup.init <service/udevd/ready> log \
[S] /usr/libexec/infix/hw-wait -- Probing hardware
# Now that everything should be probed, do a final pass over the
# uevent queue before starting syslogd and everything else
run nowarn if:udevd cgroup.init :post [S] <service/udevd/ready> log \
udevadm settle -t 30 --
run nowarn if:udevd cgroup.init :post <service/udevd/ready> log \
[S] udevadm settle -t 30 --
@@ -6,15 +6,15 @@ ident=$(basename "$0")
report()
{
if [ -r /tmp/$ident ]; then
logger -k -p user.$1 -t "$ident" "Waited for slow devices:"
sort /tmp/$ident | uniq -c | logger -k -p user.$1 -t "$ident"
if [ -r "/tmp/$ident" ]; then
logger -k -p "user.$1" -t "$ident" "Waited for slow devices:"
sort "/tmp/$ident" | uniq -c | logger -k -p "user.$1" -t "$ident"
fi
rm -f /tmp/$ident
rm -f "/tmp/$ident"
}
for i in $(seq 50); do
for _ in $(seq 50); do
again=
for dl in /sys/class/devlink/*; do
@@ -22,7 +22,7 @@ for i in $(seq 50); do
status=$(cat "$dl/status")
if [ "$status" = "consumer probing" ]; then
basename $(readlink "$dl/consumer") >>/tmp/$ident
basename "$(readlink "$dl/consumer")" >>"/tmp/$ident"
again=yes
fi