Muehlenhoff has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/310793

Change subject: Also handle systemd in keyholder script
......................................................................

Also handle systemd in keyholder script

Bug: T144578

Change-Id: I815ae9e5245e3c075e97f7ad0014df674f2ab30a
---
M modules/keyholder/files/keyholder
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/93/310793/1

diff --git a/modules/keyholder/files/keyholder 
b/modules/keyholder/files/keyholder
index 7ad7fb3..b6dab41 100755
--- a/modules/keyholder/files/keyholder
+++ b/modules/keyholder/files/keyholder
@@ -47,7 +47,11 @@
   status)
     prefers_root
     for service in agent proxy; do
-      /sbin/status "keyholder-${service}" || continue
+      if [ -x "/sbin/status" ]; then # upstart
+          /sbin/status "keyholder-${service}" || continue
+      elif [ -x "/bin/systemctl" ]; then  # systemd
+          /bin/systemctl --quiet is-active "keyholder-${service}" || continue
+      fi
       [ -r "/run/keyholder/${service}.sock" ] || continue
       SSH_AUTH_SOCK="/run/keyholder/${service}.sock" /usr/bin/ssh-add -l | sed 
's/^/- /'
     done

-- 
To view, visit https://gerrit.wikimedia.org/r/310793
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I815ae9e5245e3c075e97f7ad0014df674f2ab30a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff <mmuhlenh...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to