mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-26 09:33:14 +01:00
Protect 'enable' and 'disable' with mutex
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
6f2308e0fa
commit
c2b6d974e7
@ -373,20 +373,24 @@ case "$COMMAND" in
|
|||||||
[ $# -eq 1 ] && exit 0
|
[ $# -eq 1 ] && exit 0
|
||||||
shift
|
shift
|
||||||
[ $# -ne 1 ] && usage 2
|
[ $# -ne 1 ] && usage 2
|
||||||
|
mutex_on
|
||||||
if product_is_started; then
|
if product_is_started; then
|
||||||
detect_configuration
|
detect_configuration
|
||||||
enable_provider $1
|
enable_provider $1
|
||||||
fi
|
fi
|
||||||
|
mutex_off
|
||||||
status=0
|
status=0
|
||||||
;;
|
;;
|
||||||
disable)
|
disable)
|
||||||
[ $# -eq 1 ] && exit 0
|
[ $# -eq 1 ] && exit 0
|
||||||
shift
|
shift
|
||||||
[ $# -ne 1 ] && usage 2
|
[ $# -ne 1 ] && usage 2
|
||||||
|
mutex_on
|
||||||
if product_is_started; then
|
if product_is_started; then
|
||||||
detect_configuration
|
detect_configuration
|
||||||
disable_provider $1
|
disable_provider $1
|
||||||
fi
|
fi
|
||||||
|
mutex_off
|
||||||
status=0
|
status=0
|
||||||
;;
|
;;
|
||||||
run)
|
run)
|
||||||
|
Loading…
Reference in New Issue
Block a user