]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
network: Ensure that we only run once at a time
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Jul 2025 14:42:20 +0000 (14:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 4 Aug 2025 15:43:45 +0000 (15:43 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/udev/network-hotplug-master

index 34cec46a6b6a700bf154975082803b04071a7272..ed9cd58c3fb3dd4e8659ae67eaebc6f177c81979 100644 (file)
 
 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}"