From 0b3cefb40d223ad2482b8ddfeb2928fe5de826d5 Mon Sep 17 00:00:00 2001 From: Pete Date: Fri, 27 Feb 2026 16:38:13 -0500 Subject: [PATCH] Silence error on lock attempt Silence the error when attempting to create the lockfile fails. Diagnostics are still printed every 100 failures, but this single line is filling about 90% of /var/log/messages on deployed systems. --- lib/lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lib.sh b/lib/lib.sh index bb1241a..15f2e69 100644 --- a/lib/lib.sh +++ b/lib/lib.sh @@ -643,8 +643,8 @@ register_networkd_reloader() { # If the redirect fails, most likely because the target file # already exists and -o noclobber is in effect, $? will be set # nonzero. If it succeeds, it is set to 0 - echo $$ > "${lockfile}" - # shellcheck disable=SC2320 + 2>/dev/null echo $$ > "${lockfile}" + # shellcheck disable=SC2320 registered=$? [ $registered -eq 0 ] && break sleep 0.1