Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 593276 - net-misc/asterisk with systemd: logrotate postrotate script: You are attempting to run an openrc service on a system which openrc did not boot.
Summary: net-misc/asterisk with systemd: logrotate postrotate script: You are attempti...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-09 10:33 UTC by Karsten Kretschmer
Modified: 2016-09-18 21:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
make logrotate postrotate work with OpenRC and systemd (asterisk.logrotate4.patch,1.07 KB, patch)
2016-09-09 10:33 UTC, Karsten Kretschmer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Kretschmer 2016-09-09 10:33:55 UTC
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.
Comment 1 Tony Vroon (RETIRED) gentoo-dev 2016-09-17 13:38:33 UTC
Could the systemd team please review the suggested change and if approved, commit it to the package? Thank you.
Comment 2 Mike Gilbert gentoo-dev 2016-09-18 21:48:35 UTC
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(-)