=== modified file 'sbin/snap.lvm2' --- sbin/snap.lvm2 2015-12-15 10:18:21 +0000 +++ sbin/snap.lvm2 2015-08-17 13:53:48 +0000 @@ -13,8 +13,8 @@ LOCKDIR=/var/lock/snaprep test -d "$LOCKDIR" || mkdir -p "$LOCKDIR" || exit $? LOCKFILE="$LOCKDIR/lvm2.${SRC//\//-}" -exec 3> "$LOCKFILE" || exit $? -flock -n 3 || exit $? +touch "$LOCKFILE" || exit $? +flock -n 0 <"$LOCKFILE" || exit $? if test -b "$S_DEV"; then echo >&2 "removing stale snapshot" if grep -qF "$S_DEV" /proc/mounts; then # TODO match only on start of line