Fixing the cron 'invoke-rc.d: action rotate is unknown, but proceeding anyway' warning

  • For people receiving such a cron reporting via mail:


    Code
    1. From [email protected] Mon Feb 12 06:25:03 2018Return-Path: <[email protected]>X-Original-To: rootDelivered-To: [email protected]: by jessie64.bbox.nuxwin.com (Postfix, from userid 0)id 6A535C1530; Mon, 12 Feb 2018 06:25:03 +0100 (CET)From: [email protected] (Cron Daemon)To: [email protected]: Cron <root@jessie64> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )MIME-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bitX-Cron-Env: <SHELL=/bin/sh>X-Cron-Env: <PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin>X-Cron-Env: <HOME=/root>X-Cron-Env: <LOGNAME=root>Message-Id: <[email protected]>Date: Mon, 12 Feb 2018 06:25:03 +0100 (CET)/etc/cron.daily/logrotate:invoke-rc.d: action rotate is unknown, but proceeding anyway.

    you can avoid this by adding the --quiet invoke-rc.d option to the involved logrotate configuration files. For instance:

    Code
    1. root@jessie64:/usr/local/src# grep -nr 'invoke-rc.d.*\srotate' /etc/logrotate.d/etc/logrotate.d/rsyslog:10:invoke-rc.d rsyslog rotate > /dev/null/etc/logrotate.d/rsyslog:35:invoke-rc.d rsyslog rotate > /dev/null

    So here, in the file /etc/logrotate.d/rsyslog, you must modify the invoke-rc.d rsyslog rotate > /dev/null statements as follows:

    Code
    1. invoke-rc.d --quiet rsyslog rotate > /dev/null

    You must process same way for any logrotate configuration file for which the warning mentionned above is raised.


    This behavior is due to the fact that i-MSCP interfaces with the invoke-rc-d command through the policyrcd-script-zg2 package, hence policy-rc.d layer.


    This issue has been fixed lately in the init-system-helpers package v1.47 (Debian >= 9.0, Ubuntu >= 17.04). Thus, affected people should be those that are using either Debian Jessie, Ubuntu Trusty Thar or Ubuntu Xenial Xerus.:


    Code
    1. init-system-helpers (1.47) unstable; urgency=medium
    2. [ Christian Hofstaedtler ]
    3. * Align policy-rc.d existing/nonexisting case for custom actions.
    4. Previously, when calling invoke-rc.d with a "custom" action, it
    5. would print an error when a policy-rc.d file was installed, but
    6. it would be silent if no such file was installed. (Closes: #728682)


    See also:

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206