sys-process/acct: Changed check for systemd in logrotate's postrotate script
authorThomas Deutschmann <whissi@gentoo.org>
Thu, 27 Jul 2017 14:17:28 +0000 (16:17 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Thu, 27 Jul 2017 14:18:53 +0000 (16:18 +0200)
Gentoo systemd folk said 'test -d /run/systemd/system' is enough.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

sys-process/acct/files/acct.logrotate-r1

index 3587e5acfa682404e1e70178ef9f34aaeb1ad5d1..07696f7329dc00b868aa214aa4c0bff1bca0676b 100644 (file)
@@ -9,7 +9,7 @@
        create 0600 root root
        missingok
        postrotate
-               if type -p systemctl 2>&1 1>/dev/null && systemctl is-system-running 2>&1 1>/dev/null ; then
+               if test -d /run/systemd/system ; then
                        systemctl try-restart acct 1>/dev/null
                else
                        /etc/init.d/acct --quiet --ifstarted restart