]> git.proxmox.com Git - mirror_corosync.git/commit
logrotate: Use copytruncate method by default
authorJan Friesse <jfriesse@redhat.com>
Tue, 29 Mar 2022 15:09:22 +0000 (17:09 +0200)
committerJan Friesse <jfriesse@redhat.com>
Wed, 30 Mar 2022 14:18:36 +0000 (16:18 +0200)
commit04362046c4a9d7307feb5b68341d567b7d0b94d6
tree62e9495d4cf952fe584e82e255b06f7b0c0cfe15
parent1038e4a18fc3acf2c9d1d1f1236d9ecd50221612
logrotate: Use copytruncate method by default

The reopen lograte method has two main problems:
1. It does fail when corosync is not running (solvable by
   adding "|| true")
2. If (for some reason, like SELinux) cfgtool -L fails, logrotate
   fails and corosync keeps logging into old file. Added "|| true"
   makes situation even worse because logrotate removes file but
   corosync keeps logging into it.

Solution is to install copytruncate logrotate snip by default (and
keep reopen config file only for reference).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
conf/logrotate/Makefile.am
conf/logrotate/corosync-reopen.in