forked from pool/systemd
Frederic Crozat
b7f93adf22
- Add detect-non-running.patch: fix assertion when running systemctl under non systemd system (git). - Requires presets branding package. - Improve macros a little bit. OBS-URL: https://build.opensuse.org/request/show/85458 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=202
31 lines
995 B
Diff
31 lines
995 B
Diff
From 8185a5090a34531b9ef0a65ed3e948e7b6839754 Mon Sep 17 00:00:00 2001
|
|
From: Lennart Poettering <lennart@poettering.net>
|
|
Date: Thu, 29 Sep 2011 15:31:53 +0200
|
|
Subject: [PATCH] systemctl: fix detection whether the dbus connection is available
|
|
|
|
---
|
|
src/systemctl.c | 7 +++++++
|
|
1 files changed, 7 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/src/systemctl.c b/src/systemctl.c
|
|
index 848d6a8..7af0f73 100644
|
|
--- a/src/systemctl.c
|
|
+++ b/src/systemctl.c
|
|
@@ -4989,6 +4989,13 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
|
|
return 0;
|
|
}
|
|
|
|
+ if (!bus) {
|
|
+ log_error("Failed to get D-Bus connection: %s", error->message);
|
|
+ return -EIO;
|
|
+ }
|
|
+
|
|
+ } else {
|
|
+
|
|
if (!bus && !avoid_bus()) {
|
|
log_error("Failed to get D-Bus connection: %s", error->message);
|
|
return -EIO;
|
|
--
|
|
1.7.3.4
|
|
|