diff options
author | Julian Andres Klode <jak@debian.org> | 2017-05-16 23:18:07 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-05-19 11:23:14 +0200 |
commit | f8b8666a4c3fe36276060b8300f11ae766097f3a (patch) | |
tree | 0dc847a735f2de0074623f9e6efa2de97a3d8425 /debian | |
parent | f06527a0fe17a6780f7a4a483a8226a6e795e3d6 (diff) |
apt.systemd.daily: Drop the LOCKFD variable
Gbp-Dch: ignore
(cherry picked from commit 3819004c2cb3893bfa136f3c44a5783c42cd2a8d)
(cherry picked from commit 7e65cbfe4a073aa4e433681a8f52a3b87b31f63d)
Diffstat (limited to 'debian')
-rw-r--r-- | debian/apt.systemd.daily | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/debian/apt.systemd.daily b/debian/apt.systemd.daily index d2a0bfbed..0ecbde219 100644 --- a/debian/apt.systemd.daily +++ b/debian/apt.systemd.daily @@ -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 |