From patchwork Tue Jul 29 14:42:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 8966 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4bryk8647gz3wb0 for ; Tue, 29 Jul 2025 14:42:40 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4bryk670MLz78t for ; Tue, 29 Jul 2025 14:42:38 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4bryk657Vlz33BX for ; Tue, 29 Jul 2025 14:42:38 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4bryjy4gt2z34LY for ; Tue, 29 Jul 2025 14:42:30 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "michael.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4bryjy2WSHz2bb; Tue, 29 Jul 2025 14:42:30 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4bryjx5j3RzTgnd; Tue, 29 Jul 2025 14:42:29 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Cc: Michael Tremer Subject: [PATCH 6/6] network: Ensure that we only run once at a time Date: Tue, 29 Jul 2025 14:42:20 +0000 Message-ID: <20250729144220.1332214-6-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250729144220.1332214-1-michael.tremer@ipfire.org> References: <20250729144220.1332214-1-michael.tremer@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Signed-off-by: Michael Tremer --- config/udev/network-hotplug-master | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/udev/network-hotplug-master b/config/udev/network-hotplug-master index 34cec46a6..ed9cd58c3 100644 --- a/config/udev/network-hotplug-master +++ b/config/udev/network-hotplug-master @@ -25,6 +25,12 @@ eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings) +# Only run this script once at a time +if [ -z "${LOCKED}" ]; then + export LOCKED=1 + exec flock "${0}" "${0}" "$@" +fi + detect_zone() { local intf="${INTERFACE%?}" intf="${intf%phys}"