Browse Source

apt.systemd.daily: Drop the LOCKFD variable

Gbp-Dch: ignore
tags/debian/1.4.4
Julian Andres Klode 4 years ago
parent
commit
3819004c2c
1 changed files with 3 additions and 6 deletions
  1. +3
    -6
      debian/apt.systemd.daily

+ 3
- 6
debian/apt.systemd.daily View File

@@ -291,17 +291,14 @@ debug_echo()
}

# ------------------------ main ----------------------------

# Maintain a lock on fd 3, so we can't run the script twice at the same
# time.

if [ "$1" = "lock_is_held" ]; then
shift
else
LOCKFD=3
# Maintain a lock on fd 3, so we can't run the script twice at the same
# time.
eval $(apt-config shell StateDir Dir::State/d)
exec 3>${StateDir}/daily_lock
if ! flock -w 3600 $LOCKFD; then
if ! flock -w 3600 3; then
echo "E: Could not acquire lock" >&2
exit 1
fi


Loading…
Cancel
Save