From 8f6119020bd40cac9c1447082162361d7a84c3ca Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 22 Apr 2020 15:23:05 -0600 Subject: Fix support for pp_systemd_disabled and check for systemd existence. On our build schroots we don't have systemctl installed but do have the /etc/systemd and /lib/systemd (or /usr/lib/systemd) directories. --- etc/sudo-logsrvd.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/sudo-logsrvd.pp b/etc/sudo-logsrvd.pp index cbd35dcbc..fa908a4a9 100644 --- a/etc/sudo-logsrvd.pp +++ b/etc/sudo-logsrvd.pp @@ -224,10 +224,10 @@ This makes it possible to have all sudo I/O logs on a central server." pp_macos_service_id=ws.sudo.sudo_logsrvd %endif %if [rpm,deb] - # Only include systemd support if we find systemctl on the build - # machine. This assumes that we are building on the same distro - # that the package will be installed on. - if command -v systemctl >/dev/null; then + # Only include systemd support if it exists on the build machine. + # This assumes that we are building on the same distro that the + # package will be installed on (which is the case for sudo). + if test -d /etc/systemd; then for d in `pkg-config systemd --variable=systemdsystemunitdir 2>/dev/null` /lib/systemd/system /usr/lib/systemd/system; do if test -d "$d"; then break -- cgit v1.2.1