From e5a9bd570d7b923327adc74296023ff824703964 Mon Sep 17 00:00:00 2001
From: Simon McVittie <simon.mcvittie@collabora.co.uk>
Date: Mon, 8 Aug 2016 18:58:28 +0100
Subject: [PATCH] check-dbus-services: pass machine-readability options to
 systemctl

Otherwise, when running check-dbus-services manually, it will
launch a pager.

Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Differential Revision: https://phabricator.apertis.org/D3903
---
 dbus/check-dbus-services | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dbus/check-dbus-services b/dbus/check-dbus-services
index ace2bc6..bede775 100755
--- a/dbus/check-dbus-services
+++ b/dbus/check-dbus-services
@@ -90,11 +90,13 @@ else
     systemd_dir="/usr/lib/systemd/$systemd"
 fi
 
+systemctl="systemctl --full --no-ask-password --no-pager --$systemd"
+
 cd "/usr/share/dbus-1/$dir"
 
 # Make sure systemd and dbus-daemon are up to date with any recently-installed
 # services or configuration
-run_verbose systemctl --$systemd daemon-reload
+run_verbose $systemctl daemon-reload
 run_verbose gdbus call --$bus -d org.freedesktop.DBus -o /org/freedesktop/dbus \
     -m org.freedesktop.DBus.ReloadConfig
 
@@ -165,7 +167,7 @@ for service in *.service; do
     # The exit code from this does not necessarily tell us anything about it;
     # it will be nonzero if an on-demand service has exited.
     if [ -n "$systemd_service" ]; then
-        run_verbose systemctl -l --$systemd status "$systemd_service" || true
+        run_verbose $systemctl status "$systemd_service" || true
     fi
 
     if [ "$failed" = 0 ] && [ "$xfailed" = 0 ] && [ "$skipped" = 0 ]; then
-- 
GitLab