From d5d0e927c88f3de2f1958571e6e7c84aa16656d4 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Wed, 14 May 2025 12:52:58 -0700 Subject: [PATCH] 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. --- bin/setup-policy-routes.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/setup-policy-routes.sh b/bin/setup-policy-routes.sh index a79fd09..fbcce80 100755 --- a/bin/setup-policy-routes.sh +++ b/bin/setup-policy-routes.sh @@ -48,9 +48,13 @@ refresh) ;; start) register_networkd_reloader + counter=0 while [ ! -e "/sys/class/net/${iface}" ]; do - debug "Waiting for sysfs node to exist" + if ((counter % 1000 == 0)); then + debug "Waiting for sysfs node to exist for ${iface} (iteration $counter)" + fi sleep 0.1 + ((counter++)) done info "Starting configuration for $iface" debug /lib/systemd/systemd-networkd-wait-online -i "$iface"