From 08a184d95b18b1558d2341bfd6d885dad6200967 Mon Sep 17 00:00:00 2001
From: Tom Eastep <teastep@shorewall.net>
Date: Thu, 22 Jan 2015 08:30:05 -0800
Subject: [PATCH] Protect 'enable' and 'disable' with mutex

Signed-off-by: Tom Eastep <teastep@shorewall.net>
---
 Shorewall/Perl/prog.footer | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Shorewall/Perl/prog.footer b/Shorewall/Perl/prog.footer
index 7b21d30fa..8d1d99cd1 100644
--- a/Shorewall/Perl/prog.footer
+++ b/Shorewall/Perl/prog.footer
@@ -373,20 +373,24 @@ case "$COMMAND" in
 	[ $# -eq 1 ] && exit 0
 	shift
 	[ $# -ne 1 ] && usage 2
+	mutex_on
 	if product_is_started; then
 	    detect_configuration
 	    enable_provider $1
 	fi
+	mutex_off
 	status=0
 	;;
     disable)
 	[ $# -eq 1 ] && exit 0
 	shift
 	[ $# -ne 1 ] && usage 2
+	mutex_on
 	if product_is_started; then
 	    detect_configuration
 	    disable_provider $1
 	fi
+	mutex_off
 	status=0
 	;;
     run)