From: Michael Tremer Date: Sun, 23 Sep 2018 16:04:46 +0000 (+0200) Subject: lock: Accept names instead of paths X-Git-Tag: 010~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c19aa07777bef0a65f1694fbf450f9655939955;p=network.git lock: Accept names instead of paths Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.lock b/src/functions/functions.lock index 8f7efc43..6295a22b 100644 --- a/src/functions/functions.lock +++ b/src/functions/functions.lock @@ -33,6 +33,11 @@ lock() { local lock="${1}" shift + # Move locks with name only into lock directory + if [ "${lock:0:1}" != "/" ]; then + lock="${LOCK_DIR}/${lock}" + fi + local timeout="60" # Make partent directory