summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6e3f2c8)
If LOCKDIR does not exist it means that the lock is not active so
there's no need to do anything.
set -e
LOCKDIR=/run/lock/mylockdir
set -e
LOCKDIR=/run/lock/mylockdir
+[ -d "$LOCKDIR" ] || exit 0
+
LOCKPID=$(cat "$LOCKDIR/pid")
[ "$LOCKPID" = $PPID ] || { echo "The enter script was launched from another process. Unlocking aborted." >&2; exit 1; }
LOCKPID=$(cat "$LOCKDIR/pid")
[ "$LOCKPID" = $PPID ] || { echo "The enter script was launched from another process. Unlocking aborted." >&2; exit 1; }