diff options
author | Karel Kočí <karel.koci@nic.cz> | 2018-08-28 12:44:41 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2018-08-28 12:44:41 +0200 |
commit | 502058108542a250f46a79c6064863ae7086fc2d (patch) | |
tree | 8297ba9da8896adf4d9714ddb87742ac86d8d978 /scripts/utils | |
parent | 5351198aded73217ef92a8deaca1109cb12f189b (diff) | |
download | laminar-cnf-502058108542a250f46a79c6064863ae7086fc2d.tar.gz laminar-cnf-502058108542a250f46a79c6064863ae7086fc2d.tar.bz2 laminar-cnf-502058108542a250f46a79c6064863ae7086fc2d.zip |
Fix laminarc lock release
Diffstat (limited to 'scripts/utils')
-rw-r--r-- | scripts/utils | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/utils b/scripts/utils index 0034d9b..0414868 100644 --- a/scripts/utils +++ b/scripts/utils @@ -15,9 +15,9 @@ echo_fail() { ## Cleanup handler ############################################################## _LAMINAR_LOCKS="" _handle_exit() { - # Free all locks + # Release all locks for LOCK in $_LAMINAR_LOCKS; do - laminarc unlock "$(basename "$0")-$LOCK" + laminarc release "$(basename "$0")-$LOCK" done } trap _handle_exit EXIT @@ -63,8 +63,8 @@ laminar_self_lock() { # Unlock special lock for this job # Extension appended to lock name has to be provided as first argument -laminar_self_unlock() { +laminar_self_release() { _check_trap - laminarc unlock "$(basename "$0")-$1" + laminarc release "$(basename "$0")-$1" _LAMINAR_LOCKS="$(echo "$_LAMINAR_LOCKS" | sed "s/ $1//")" } |