Created attachment 445296 [details, diff] make logrotate postrotate work with OpenRC and systemd The logrotate postrotate script attempts to use the OpenRC init script’s status function to check if Asterisk is running. When systemd is used as init system, this check fails and outputs an error message ("You are attempting to run an openrc service on a system which openrc did not boot. …") The attached patch makes the check conditional on OpenRC being used and adds an equivalent for systemd.
Could the systemd team please review the suggested change and if approved, commit it to the package? Thank you.
commit 3d6a8bd065528aa255a7e409c05474b5910c574f Author: Mike Gilbert <floppym@gentoo.org> Date: Sun Sep 18 17:47:34 2016 -0400 net-misc/asterisk: make logrotate file work with systemd Patch by Karsten Kretschmer. Bug: https://bugs.gentoo.org/593276 Package-Manager: portage-2.3.0_p36 .../{asterisk-11.21.1.ebuild => asterisk-11.21.1-r1.ebuild} | 0 .../{asterisk-13.11.2.ebuild => asterisk-13.11.2-r1.ebuild} | 0 net-misc/asterisk/files/1.6.2/asterisk.logrotate4 | 6 ++++-- 3 files changed, 4 insertions(+), 2 deletions(-)