Skip to content

Commit d5d0e92

Browse files
committed
Change "Waiting for sysfs node to exist" log message
- now includes the interface it is waiting for. - only logs once every 1,000 iterations of this loop, to reduce log noise in the case that it gets stuck in a loop. This corresponds to one log message about every 2 minutes. - includes iteration counter for debugging long-running loops.
1 parent 293278c commit d5d0e92

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/setup-policy-routes.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@ refresh)
4848
;;
4949
start)
5050
register_networkd_reloader
51+
counter=0
5152
while [ ! -e "/sys/class/net/${iface}" ]; do
52-
debug "Waiting for sysfs node to exist"
53+
if ((counter % 1000 == 0)); then
54+
debug "Waiting for sysfs node to exist for ${iface} (iteration $counter)"
55+
fi
5356
sleep 0.1
57+
((counter++))
5458
done
5559
info "Starting configuration for $iface"
5660
debug /lib/systemd/systemd-networkd-wait-online -i "$iface"

0 commit comments

Comments
 (0)