humaton / fedora-infra / ansible

Forked from fedora-infra/ansible 5 years ago
Clone

6e62fcb Don't drop temporary files all over the place

1 file Authored by nphilipp 3 years ago, Committed by asaleh 3 years ago,
    Don't drop temporary files all over the place
    
    When renaming a file over another which is the same hard link, the
    rename is a no-op. This left many temporary files in /var/log/hosts
    because a file is attempted to be synced (and thus hard-linked between
    dated and undated file names) over a couple of days. The solution to
    this is how the `ln` command does it: rename, then unlink the temporary
    file.
    
    Signed-off-by: Nils Philippsen <nils@redhat.com>