forked from pool/systemd
29 lines
826 B
Diff
29 lines
826 B
Diff
|
From d255133d8edc84662d2370a77414505a800d1922 Mon Sep 17 00:00:00 2001
|
||
|
From: Lennart Poettering <lennart@poettering.net>
|
||
|
Date: Sat, 12 Jan 2013 00:00:22 +0100
|
||
|
Subject: [PATCH] systemctl: don't hit an assert if we try to reboot and dbus
|
||
|
is dead
|
||
|
|
||
|
https://bugzilla.redhat.com/show_bug.cgi?id=889624
|
||
|
---
|
||
|
src/systemctl/systemctl.c | 3 +++
|
||
|
1 file changed, 3 insertions(+)
|
||
|
|
||
|
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||
|
index 0def1a2..bfa4d45 100644
|
||
|
--- a/src/systemctl/systemctl.c
|
||
|
+++ b/src/systemctl/systemctl.c
|
||
|
@@ -1738,6 +1738,9 @@ static int reboot_with_logind(DBusConnection *bus, enum action a) {
|
||
|
const char *method;
|
||
|
dbus_bool_t interactive = true;
|
||
|
|
||
|
+ if (!bus)
|
||
|
+ return -EIO;
|
||
|
+
|
||
|
polkit_agent_open_if_enabled();
|
||
|
|
||
|
switch (a) {
|
||
|
--
|
||
|
1.7.10.4
|
||
|
|