diff --git a/usr/libexec/security-misc/apt-get-update b/usr/libexec/security-misc/apt-get-update index 3086e55..fecfe4f 100755 --- a/usr/libexec/security-misc/apt-get-update +++ b/usr/libexec/security-misc/apt-get-update @@ -4,10 +4,10 @@ ## See the file COPYING for copying conditions. write_pid_file() { - safe-rm -rf /tmp/security-misc-apt-get-update-pid; - install -m644 /dev/null /tmp/security-misc-apt-get-update-pid \ - || exit 1 - echo "$$" > /tmp/security-misc-apt-get-update-pid + [[ -z "${TMP:-}" ]] && error "TMP is unset" + safe-rm -rf "$TMP/security-misc-apt-get-update-pid"; + install -m644 /dev/null "$TMP/security-misc-apt-get-update-pid" || exit 1 + echo "$$" | sponge -- "$TMP/security-misc-apt-get-update-pid" } sigterm_trap() {