summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2020-04-22 15:23:05 -0600
committerTodd C. Miller <Todd.Miller@sudo.ws>2020-04-22 15:23:05 -0600
commit8f6119020bd40cac9c1447082162361d7a84c3ca (patch)
tree5dc03ea0479fa90ea6173de2432e725e568b07cc /etc
parent611a2248735162f5d8869750b4712707ebfc1c3f (diff)
downloadsudo-8f6119020bd40cac9c1447082162361d7a84c3ca.tar.gz
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/sudo-logsrvd.pp8
1 files changed, 4 insertions, 4 deletions
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