From 19901e49c8c15dd9c9939bc9dd8eb7ebda590d79 Mon Sep 17 00:00:00 2001 From: Joris van Lier Date: Fri, 8 Nov 2019 23:42:16 +0100 Subject: [PATCH] remove hardcoded path for flock: homebrew default installs in /usr/local/bin wich should be in PATH when using flock from https://github.com/discoteq/flock --- cmd/zed/zed.d/zed-functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/zed/zed.d/zed-functions.sh b/cmd/zed/zed.d/zed-functions.sh index 11be2831a6..c3e711a882 100644 --- a/cmd/zed/zed.d/zed-functions.sh +++ b/cmd/zed/zed.d/zed-functions.sh @@ -125,7 +125,7 @@ zed_lock() # Obtain a lock on the file bound to the given file descriptor. # eval "exec ${fd}> '${lockfile}'" - err="$(/opt/homebrew/bin/flock "${fd}" 2>&1)" + err="$(flock "${fd}" 2>&1)" if [ $? -ne 0 ]; then zed_log_err "failed to lock \"${lockfile}\": ${err}" fi @@ -163,7 +163,7 @@ zed_unlock() # Release the lock and close the file descriptor. # - err="$(/opt/homebrew/bin/flock -u "${fd}" 2>&1)" + err="$(flock -u "${fd}" 2>&1)" if [ $? -ne 0 ]; then zed_log_err "failed to unlock \"${lockfile}\": ${err}" fi